From cdf715a0b5bf26f6e19dfd75fdbf23deffcc6d1c Mon Sep 17 00:00:00 2001 From: "Pavlas, Zdenek" Date: Wed, 9 Nov 2016 00:22:28 -0800 Subject: i386 + bcheck: fix __bound_local_new With -b, this produces garbage. Code to call __bound_local_new is put at wrong place, overwriting the regparam setup code. Fix copied from x86_64-gen.c. void __attribute__((regparm(3))) fun(int unused) { char local[1]; } --- x86_64-gen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'x86_64-gen.c') diff --git a/x86_64-gen.c b/x86_64-gen.c index dd52e4a..a33bb48 100644 --- a/x86_64-gen.c +++ b/x86_64-gen.c @@ -1658,7 +1658,7 @@ void gfunc_epilog(void) o(0x5250); /* save returned value, if any */ greloc(cur_text_section, sym_data, ind + 1, R_386_32); oad(0xb8, 0); /* mov xxx, %rax */ - o(0xc78948); /* mov %rax,%rdi ## first arg in %rdi, this must be ptr */ + o(0xc78948); /* mov %rax,%rdi # first arg in %rdi, this must be ptr */ gen_static_call(TOK___bound_local_delete); o(0x585a); /* restore returned value, if any */ } -- cgit v1.3.1