diff options
author | kan <kan@FreeBSD.org> | 2003-11-07 03:05:29 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2003-11-07 03:05:29 +0000 |
commit | a084c35ceb956547fd51afa69bbb1ddde34622dc (patch) | |
tree | ff877898269dfc629cdb62275a4c8db7b18b8956 /contrib/gcc/function.c | |
parent | 1fb226c0cab359db650569c666e4fac31032482f (diff) | |
download | FreeBSD-src-a084c35ceb956547fd51afa69bbb1ddde34622dc.zip FreeBSD-src-a084c35ceb956547fd51afa69bbb1ddde34622dc.tar.gz |
No FreeBSD-local changes in these files.
Diffstat (limited to 'contrib/gcc/function.c')
-rw-r--r-- | contrib/gcc/function.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/contrib/gcc/function.c b/contrib/gcc/function.c index daa2cab..e055375 100644 --- a/contrib/gcc/function.c +++ b/contrib/gcc/function.c @@ -1373,8 +1373,9 @@ put_var_into_stack (decl, rescan) if (function->decl == context) break; - /* If this is a variable-size object with a pseudo to address it, - put that pseudo into the stack, if the var is nonlocal. */ + /* If this is a variable-sized object or a structure passed by invisible + reference, with a pseudo to address it, put that pseudo into the stack + if the var is non-local. */ if (TREE_CODE (decl) != SAVE_EXPR && DECL_NONLOCAL (decl) && GET_CODE (reg) == MEM && GET_CODE (XEXP (reg, 0)) == REG @@ -1384,8 +1385,12 @@ put_var_into_stack (decl, rescan) decl_mode = promoted_mode = GET_MODE (reg); } + /* If this variable lives in the current function and we don't need to put it + in the stack for the sake of setjmp or the non-locality, try to keep it in + a register until we know we actually need the address. */ can_use_addressof = (function == 0 + && ! (TREE_CODE (decl) != SAVE_EXPR && DECL_NONLOCAL (decl)) && optimize > 0 /* FIXME make it work for promoted modes too */ && decl_mode == promoted_mode @@ -1404,9 +1409,6 @@ put_var_into_stack (decl, rescan) if (GET_CODE (reg) == REG) { - /* If this variable lives in the current function and we don't need - to put things in the stack for the sake of setjmp, try to keep it - in a register until we know we actually need the address. */ if (can_use_addressof) gen_mem_addressof (reg, decl, rescan); else |