From: jiang <30155751@qq.com> Date: Sun, 22 Jun 2014 17:08:54 +0000 (+0800) Subject: revert vstore() X-Git-Tag: release_0_9_27~874^2 X-Git-Url: https://repo.or.cz/w/tinycc.git/commitdiff_plain/f26fdaefd8b35489f26462992010b9ecd76d8fe3 revert vstore() --- diff --git a/tccgen.c b/tccgen.c index b2a77178..387b9863 100644 --- a/tccgen.c +++ b/tccgen.c @@ -2552,6 +2552,11 @@ ST_FUNC void vstore(void) /* remove bit field info to avoid loops */ vtop[-1].type.t = ft & ~(VT_BITFIELD | (-1 << VT_STRUCT_SHIFT)); + /* duplicate source into other register */ + gv_dup(); + vswap(); + vrott(3); + if((ft & VT_BTYPE) == VT_BOOL) { gen_cast(&vtop[-1].type); vtop[-1].type.t = (vtop[-1].type.t & ~VT_BTYPE) | (VT_BYTE | VT_UNSIGNED); @@ -2583,6 +2588,9 @@ ST_FUNC void vstore(void) gen_op('|'); /* store result */ vstore(); + + /* pop off shifted source from "duplicate source..." above */ + vpop(); } else { #ifdef CONFIG_TCC_BCHECK /* bound check case */