History

VLA code minor fix

seyko committed 11 years ago

Commit c75d0de1 parent 999274c1 file · +2 −1Browse files

Unified · Split

x86_64-gen.c+2−1
@@ -2225,6 +2225,8 @@ ST_FUNC void gen_vla_sp_restore(int addr) { · 2224 unmodified lines
2225 2225
2226/* Subtract from the stack pointer, and push the resulting value onto the stack */2226/* Subtract from the stack pointer, and push the resulting value onto the stack */
2227ST_FUNC void gen_vla_alloc(CType *type, int align) {2227ST_FUNC void gen_vla_alloc(CType *type, int align) {
2228 int r;
2229 get_flags();
2228#ifdef TCC_TARGET_PE2230#ifdef TCC_TARGET_PE
2229 /* alloca does more than just adjust %rsp on Windows */2231 /* alloca does more than just adjust %rsp on Windows */
2230 vpush_global_sym(&func_old_type, TOK_alloca);2232 vpush_global_sym(&func_old_type, TOK_alloca);
@@ -2232,7 +2234,6 @@ ST_FUNC void gen_vla_alloc(CType *type, int align) { · 1 unmodified line
2232 gfunc_call(1);2234 gfunc_call(1);
2233 vset(type, REG_IRET, 0);2235 vset(type, REG_IRET, 0);
2234#else2236#else
2235 int r;
2236 r = gv(RC_INT); /* allocation size */2237 r = gv(RC_INT); /* allocation size */
2237 /* sub r,%rsp */2238 /* sub r,%rsp */
2238 o(0x2b48);2239 o(0x2b48);

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