From ddf5ced4a7eb10629d180c09c631812fa568d917 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Sun, 16 Jun 2024 22:26:51 +0200 Subject: [PATCH] revert 4bc4c958 Hopefully the right time now! --- amd64/emit.c | 2 +- arm64/emit.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/amd64/emit.c b/amd64/emit.c index 2a9b9d2..00dd80f 100644 --- a/amd64/emit.c +++ b/amd64/emit.c @@ -581,7 +581,7 @@ amd64_emitfn(Fn *fn, FILE *f) uint64_t fs; emitfnlnk(fn->name, &fn->lnk, f); - fputs("\tpushq %rbp\n\tmovq %rsp, %rbp\n", f); + fputs("\tendbr64\n\tpushq %rbp\n\tmovq %rsp, %rbp\n", f); fs = framesz(fn); if (fs) fprintf(f, "\tsubq $%"PRIu64", %%rsp\n", fs); diff --git a/arm64/emit.c b/arm64/emit.c index f5166e0..ffdc178 100644 --- a/arm64/emit.c +++ b/arm64/emit.c @@ -514,6 +514,7 @@ arm64_emitfn(Fn *fn, FILE *out) if (T.apple) e->fn->lnk.align = 4; emitfnlnk(e->fn->name, &e->fn->lnk, e->f); + fputs("\thint\t#34\n", e->f); framelayout(e); if (e->fn->vararg && !T.apple) {