From 999274ca900b23da11abeda5f38413eb6fbec9a8 Mon Sep 17 00:00:00 2001 From: seyko Date: Mon, 4 May 2015 04:09:05 +0300 Subject: a lot simpler VLA code Author: Philip Our VLA code can be made a lot simpler (simple enough for even me to understand it) by giving up on the optimization idea, which is very tempting. There's a patch to do that attached, feel free to test and commit it if you like. (It passes all the tests, at least --- x86_64-gen.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'x86_64-gen.c') diff --git a/x86_64-gen.c b/x86_64-gen.c index c7a35d8..5a080af 100644 --- a/x86_64-gen.c +++ b/x86_64-gen.c @@ -2240,11 +2240,7 @@ ST_FUNC void gen_vla_alloc(CType *type, int align) { /* We align to 16 bytes rather than align */ /* and ~15, %rsp */ o(0xf0e48348); - /* mov %rsp, r */ - o(0x8948); - o(0xe0 | REG_VALUE(r)); vpop(); - vset(type, r, 0); #endif } -- cgit v1.3.1