#ifndef __MACRO_IO_LIB_H__\r
#define __MACRO_IO_LIB_H__\r
\r
-#if defined(__APPLE__)\r
-\r
-//\r
-// ldr reg, =expr does not work with current Apple tool chain. So do the work our selves\r
-//\r
-\r
-// load _Reg with _Data\r
-#define LoadConstantToReg(_Data, _Reg) \\r
- ldr _Reg, [pc, #0] ; \\r
- b 1f ; \\r
- .long (_Data) ; \\r
-1:\r
-\r
-#elif defined (__GNUC__)\r
-\r
-#define LoadConstantToReg(Data, Reg) \\r
- ldr Reg, =Data\r
-\r
-#else\r
-\r
-//\r
-// Use ARM assembly macros, form armasam\r
-//\r
-// Less magic in the macros if ldr reg, =expr works\r
-//\r
-\r
-// load _Reg with _Data\r
-\r
-\r
-#define LoadConstantToReg(Data, Reg) LoadConstantToRegMacro Data, Reg\r
-\r
-#endif\r
-\r
#define _ASM_FUNC(Name, Section) \\r
.global Name ; \\r
.section #Section, "ax" ; \\r