We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
__asm int foo_asm() { ldr r1, dlblulbl add r1, r1, pc ldr r0,[r1,r0,lsl #2] bx lr aligndlbl dcd __cpp(table) - ulbl - 8}
extern short int table_1[33];int foo(int i){ return table_1[i];}__asm int foo_asm(int i){ LDR r1, dlblulblADD r1, r1, pcLDR r0, [r1,r0,lsl #2]bx lraligndlbl DCD __cpp(table_1) - ulbl - 8 RELOC 96, table_1 //if this is used then only TEXTREL is not generated}
; generated by ARM NEON C/C++ Compiler, RVCT4.0 [Build 771]; commandline armcc [--arm -c -S --gnu --no_hide_all --library_interface=aeabi_glibc -oobj/test.tmp.s --cpu=Cortex-A8 --fpu=VFPv3 --apcs=/interwork//fpic --no_unaligned_access -O3 -Otime --vectorize --enum_is_int --wchar32 obj/test.tmp.c] ARM REQUIRE8 PRESERVE8 AREA ||.text||, CODE, READONLY, ALIGN=2||foo|| PROC LDR r1,|L0.20| LDR r1,[pc,r1] ADD r0,r1,r0,LSL #1 LDRSH r0,[r0,#0] BX lr ENDP|L0.20| DCD 0x00000008 ;Line 18 RELOC 96, table_1 ;Line 19 AREA ||.arm_vfe_header||, DATA, READONLY, NOALLOC, ALIGN=2 DCD 0x00000000;*** Start embedded assembler *** #line 1 "obj/test.tmp.c" AREA ||.emb_text||, CODE, READONLY ARM EXPORT |foo_asm| [DYNAMIC] IMPORT |table_1| [DYNAMIC]#line 10|foo_asm| PROC#line 11LDR r1, dlblulblADD r1, r1, pcLDR r0, [r1,r0,lsl #2]bx lraligndlblDCD |table_1| - ulbl - 8 ;Line 44ENDP;*** End embedded assembler *** EXPORT ||foo|| [CODE,DYNAMIC] IMPORT ||Lib$$Request$$armlib|| [CODE,WEAK] IMPORT table_1 [DATA,DYNAMIC] ATTR FILESCOPE ATTR SETVALUE Tag_ABI_PCS_wchar_t,4 ATTR SETVALUE Tag_ABI_enum_size,2 ATTR SETVALUE Tag_ABI_optimization_goals,2 ATTR SETSTRING Tag_conformance,"2.06" ATTR SETVALUE AV,18,1 ASSERT {ENDIAN} = "little" ASSERT {INTER} = {TRUE} ASSERT {ROPI} = {TRUE} ASSERT {RWPI} = {FALSE} ASSERT {IEEE_FULL} = {FALSE} ASSERT {IEEE_PART} = {FALSE} ASSERT {IEEE_JAVA} = {FALSE} END