History

arm64-win32 support: use arm64_sym()

Benjamin Oldenburg committed 7 months ago

Commit 99713bc1 parent 303bade1 file · +3 −12Browse files

Unified · Split

arm64-gen.c+3−12
@@ -729,10 +729,7 @@ static void gen_bounds_epilog(void) · 728 unmodified lines
729 if (offset_modified) {729 if (offset_modified) {
730 saved_ind = ind;730 saved_ind = ind;
731 ind = func_bound_ind;731 ind = func_bound_ind;
732 greloca(cur_text_section, sym_data, ind, R_AARCH64_ADR_GOT_PAGE, 0);732 arm64_sym(0, sym_data, 0);
733 o(0x90000000 | 0); // adrp x0, #sym_data
734 greloca(cur_text_section, sym_data, ind, R_AARCH64_LD64_GOT_LO12_NC, 0);
735 o(0xf9400000 | 0 | (0 << 5)); // ld x0,[x0, #sym_data]
736 gen_bounds_call(TOK___bound_local_new);733 gen_bounds_call(TOK___bound_local_new);
737 ind = saved_ind;734 ind = saved_ind;
738 }735 }
@@ -740,10 +737,7 @@ static void gen_bounds_epilog(void) · 1 unmodified line
740 /* generate bound check local freeing */737 /* generate bound check local freeing */
741 o(0xa9bf07e0); /* stp x0, x1, [sp, #-16]! */738 o(0xa9bf07e0); /* stp x0, x1, [sp, #-16]! */
742 o(0x3c9f0fe0); /* str q0, [sp, #-16]! */739 o(0x3c9f0fe0); /* str q0, [sp, #-16]! */
743 greloca(cur_text_section, sym_data, ind, R_AARCH64_ADR_GOT_PAGE, 0);740 arm64_sym(0, sym_data, 0);
744 o(0x90000000 | 0); // adrp x0, #sym_data
745 greloca(cur_text_section, sym_data, ind, R_AARCH64_LD64_GOT_LO12_NC, 0);
746 o(0xf9400000 | 0 | (0 << 5)); // ld x0,[x0, #sym_data]
747 gen_bounds_call(TOK___bound_local_delete);741 gen_bounds_call(TOK___bound_local_delete);
748 o(0x3cc107e0); /* ldr q0, [sp], #16 */742 o(0x3cc107e0); /* ldr q0, [sp], #16 */
749 o(0xa8c107e0); /* ldp x0, x1, [sp], #16 */743 o(0xa8c107e0); /* ldp x0, x1, [sp], #16 */
@@ -2085,10 +2079,7 @@ ST_FUNC void gen_increment_tcov (SValue *sv) · 1335 unmodified lines
2085 vpushv(sv);2079 vpushv(sv);
2086 vtop->r = r1 = get_reg(RC_INT);2080 vtop->r = r1 = get_reg(RC_INT);
2087 r2 = get_reg(RC_INT);2081 r2 = get_reg(RC_INT);
2088 greloca(cur_text_section, sv->sym, ind, R_AARCH64_ADR_GOT_PAGE, 0);2082 arm64_sym(r1, sv->sym, 0);
2089 o(0x90000000 | r1); // adrp r1, #sym
2090 greloca(cur_text_section, sv->sym, ind, R_AARCH64_LD64_GOT_LO12_NC, 0);
2091 o(0xf9400000 | r1 | (r1 << 5)); // ld xr,[xr, #sym]
2092 o(0xf9400000 | (intr(r1)<<5) | intr(r2)); // ldr r2, [r1]2083 o(0xf9400000 | (intr(r1)<<5) | intr(r2)); // ldr r2, [r1]
2093 o(0x91000400 | (intr(r2)<<5) | intr(r2)); // add r2, r2, #12084 o(0x91000400 | (intr(r2)<<5) | intr(r2)); // add r2, r2, #1
2094 o(0xf9000000 | (intr(r1)<<5) | intr(r2)); // str r2, [r1]2085 o(0xf9000000 | (intr(r1)<<5) | intr(r2)); // str r2, [r1]

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