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
729729 if (offset_modified) {
730730 saved_ind = ind;
731731 ind = func_bound_ind;
732− greloca(cur_text_section, sym_data, ind, R_AARCH64_ADR_GOT_PAGE, 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]
732+ arm64_sym(0, sym_data, 0);
736733 gen_bounds_call(TOK___bound_local_new);
737734 ind = saved_ind;
738735 }
@@ -740,10 +737,7 @@ static void gen_bounds_epilog(void) · 1 unmodified line
740737 /* generate bound check local freeing */
741738 o(0xa9bf07e0); /* stp x0, x1, [sp, #-16]! */
742739 o(0x3c9f0fe0); /* str q0, [sp, #-16]! */
743− greloca(cur_text_section, sym_data, ind, R_AARCH64_ADR_GOT_PAGE, 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]
740+ arm64_sym(0, sym_data, 0);
747741 gen_bounds_call(TOK___bound_local_delete);
748742 o(0x3cc107e0); /* ldr q0, [sp], #16 */
749743 o(0xa8c107e0); /* ldp x0, x1, [sp], #16 */
@@ -2085,10 +2079,7 @@ ST_FUNC void gen_increment_tcov (SValue *sv) · 1335 unmodified lines
20852079 vpushv(sv);
20862080 vtop->r = r1 = get_reg(RC_INT);
20872081 r2 = get_reg(RC_INT);
2088− greloca(cur_text_section, sv->sym, ind, R_AARCH64_ADR_GOT_PAGE, 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]
2082+ arm64_sym(r1, sv->sym, 0);
20922083 o(0xf9400000 | (intr(r1)<<5) | intr(r2)); // ldr r2, [r1]
20932084 o(0x91000400 | (intr(r2)<<5) | intr(r2)); // add r2, r2, #1
20942085 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