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
22252225
22262226 /* Subtract from the stack pointer, and push the resulting value onto the stack */
22272227 ST_FUNC void gen_vla_alloc(CType *type, int align) {
2228+ int r;
2229+ get_flags();
22282230 #ifdef TCC_TARGET_PE
22292231 /* alloca does more than just adjust %rsp on Windows */
22302232 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
22322234 gfunc_call(1);
22332235 vset(type, REG_IRET, 0);
22342236 #else
2235− int r;
22362237 r = gv(RC_INT); /* allocation size */
22372238 /* sub r,%rsp */
22382239 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