History

Fix bounds checking struct return on arm/arm64

herman ten brugge committed 4 years ago

Commit 4a03f1f1 parent 02443202 files · +4 −4Browse files

Unified · Split

2 files
  1. arm-gen.c +2 −2
  2. arm64-gen.c +2 −2
arm-gen.c+2−2
@@ -883,14 +883,14 @@ static void gen_bounds_epilog(void) · 882 unmodified lines
883 883
884 /* generate bound check local freeing */884 /* generate bound check local freeing */
885 o(0xe92d0003); /* push {r0,r1} */885 o(0xe92d0003); /* push {r0,r1} */
886 o(0xed2d0b02); /* vpush {d0} */886 o(0xed2d0b04); /* vpush {d0,d1} */
887 o(0xe59f0000); /* ldr r0, [pc] */887 o(0xe59f0000); /* ldr r0, [pc] */
888 o(0xea000000); /* b $+4 */888 o(0xea000000); /* b $+4 */
889 greloc(cur_text_section, sym_data, ind, R_ARM_REL32);889 greloc(cur_text_section, sym_data, ind, R_ARM_REL32);
890 o(-12); /* lbounds_section->data_offset */890 o(-12); /* lbounds_section->data_offset */
891 o(0xe080000f); /* add r0,r0,pc */891 o(0xe080000f); /* add r0,r0,pc */
892 gen_bounds_call(TOK___bound_local_delete);892 gen_bounds_call(TOK___bound_local_delete);
893 o(0xecbd0b02); /* vpop {d0} */893 o(0xecbd0b04); /* vpop {d0,d1} */
894 o(0xe8bd0003); /* pop {r0,r1} */894 o(0xe8bd0003); /* pop {r0,r1} */
895}895}
896#endif896#endif
arm64-gen.c+2−2
@@ -725,7 +725,7 @@ static void gen_bounds_epilog(void) · 724 unmodified lines
725 }725 }
726 726
727 /* generate bound check local freeing */727 /* generate bound check local freeing */
728 o(0xf81f0fe0); /* str x0, [sp, #-16]! */728 o(0xa9be07e0); /* stp x0, x1, [sp, #-32]! */
729 o(0x3c9f0fe0); /* str q0, [sp, #-16]! */729 o(0x3c9f0fe0); /* str q0, [sp, #-16]! */
730 greloca(cur_text_section, sym_data, ind, R_AARCH64_ADR_GOT_PAGE, 0);730 greloca(cur_text_section, sym_data, ind, R_AARCH64_ADR_GOT_PAGE, 0);
731 o(0x90000000 | 0); // adrp x0, #sym_data731 o(0x90000000 | 0); // adrp x0, #sym_data
@@ -733,7 +733,7 @@ static void gen_bounds_epilog(void) · 1 unmodified line
733 o(0xf9400000 | 0 | (0 << 5)); // ld x0,[x0, #sym_data]733 o(0xf9400000 | 0 | (0 << 5)); // ld x0,[x0, #sym_data]
734 gen_bounds_call(TOK___bound_local_delete);734 gen_bounds_call(TOK___bound_local_delete);
735 o(0x3cc107e0); /* ldr q0, [sp], #16 */735 o(0x3cc107e0); /* ldr q0, [sp], #16 */
736 o(0xf84107e0); /* ldr x0, [sp], #16 */736 o(0xa8c207e0); /* ldp x0, x1, [sp], #32 */
737}737}
738#endif738#endif
739 739

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t