function.c (117404) | function.c (122190) |
---|---|
1/* Expands front end tree to back end RTL for GNU C-Compiler 2 Copyright (C) 1987, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 3 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 4 5This file is part of GCC. 6 7GCC is free software; you can redistribute it and/or modify it under 8the terms of the GNU General Public License as published by the Free --- 1359 unchanged lines hidden (view full) --- 1368 because it might not be in any active function. 1369 FIXME: Is that really supposed to happen? 1370 It does in ObjC at least. */ 1371 if (context != current_function_decl && context != inline_function_decl) 1372 for (function = outer_function_chain; function; function = function->outer) 1373 if (function->decl == context) 1374 break; 1375 | 1/* Expands front end tree to back end RTL for GNU C-Compiler 2 Copyright (C) 1987, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 3 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 4 5This file is part of GCC. 6 7GCC is free software; you can redistribute it and/or modify it under 8the terms of the GNU General Public License as published by the Free --- 1359 unchanged lines hidden (view full) --- 1368 because it might not be in any active function. 1369 FIXME: Is that really supposed to happen? 1370 It does in ObjC at least. */ 1371 if (context != current_function_decl && context != inline_function_decl) 1372 for (function = outer_function_chain; function; function = function->outer) 1373 if (function->decl == context) 1374 break; 1375 |
1376 /* If this is a variable-size object with a pseudo to address it, 1377 put that pseudo into the stack, if the var is nonlocal. */ | 1376 /* If this is a variable-sized object or a structure passed by invisible 1377 reference, with a pseudo to address it, put that pseudo into the stack 1378 if the var is non-local. */ |
1378 if (TREE_CODE (decl) != SAVE_EXPR && DECL_NONLOCAL (decl) 1379 && GET_CODE (reg) == MEM 1380 && GET_CODE (XEXP (reg, 0)) == REG 1381 && REGNO (XEXP (reg, 0)) > LAST_VIRTUAL_REGISTER) 1382 { 1383 reg = XEXP (reg, 0); 1384 decl_mode = promoted_mode = GET_MODE (reg); 1385 } 1386 | 1379 if (TREE_CODE (decl) != SAVE_EXPR && DECL_NONLOCAL (decl) 1380 && GET_CODE (reg) == MEM 1381 && GET_CODE (XEXP (reg, 0)) == REG 1382 && REGNO (XEXP (reg, 0)) > LAST_VIRTUAL_REGISTER) 1383 { 1384 reg = XEXP (reg, 0); 1385 decl_mode = promoted_mode = GET_MODE (reg); 1386 } 1387 |
1388 /* If this variable lives in the current function and we don't need to put it 1389 in the stack for the sake of setjmp or the non-locality, try to keep it in 1390 a register until we know we actually need the address. */ |
|
1387 can_use_addressof 1388 = (function == 0 | 1391 can_use_addressof 1392 = (function == 0 |
1393 && ! (TREE_CODE (decl) != SAVE_EXPR && DECL_NONLOCAL (decl)) |
|
1389 && optimize > 0 1390 /* FIXME make it work for promoted modes too */ 1391 && decl_mode == promoted_mode 1392#ifdef NON_SAVING_SETJMP 1393 && ! (NON_SAVING_SETJMP && current_function_calls_setjmp) 1394#endif 1395 ); 1396 1397 /* If we can't use ADDRESSOF, make sure we see through one we already 1398 generated. */ 1399 if (! can_use_addressof && GET_CODE (reg) == MEM 1400 && GET_CODE (XEXP (reg, 0)) == ADDRESSOF) 1401 reg = XEXP (XEXP (reg, 0), 0); 1402 1403 /* Now we should have a value that resides in one or more pseudo regs. */ 1404 1405 if (GET_CODE (reg) == REG) 1406 { | 1394 && optimize > 0 1395 /* FIXME make it work for promoted modes too */ 1396 && decl_mode == promoted_mode 1397#ifdef NON_SAVING_SETJMP 1398 && ! (NON_SAVING_SETJMP && current_function_calls_setjmp) 1399#endif 1400 ); 1401 1402 /* If we can't use ADDRESSOF, make sure we see through one we already 1403 generated. */ 1404 if (! can_use_addressof && GET_CODE (reg) == MEM 1405 && GET_CODE (XEXP (reg, 0)) == ADDRESSOF) 1406 reg = XEXP (XEXP (reg, 0), 0); 1407 1408 /* Now we should have a value that resides in one or more pseudo regs. */ 1409 1410 if (GET_CODE (reg) == REG) 1411 { |
1407 /* If this variable lives in the current function and we don't need 1408 to put things in the stack for the sake of setjmp, try to keep it 1409 in a register until we know we actually need the address. */ | |
1410 if (can_use_addressof) 1411 gen_mem_addressof (reg, decl, rescan); 1412 else 1413 put_reg_into_stack (function, reg, TREE_TYPE (decl), promoted_mode, 1414 decl_mode, volatilep, 0, usedp, 0); 1415 } 1416 else if (GET_CODE (reg) == CONCAT) 1417 { --- 6567 unchanged lines hidden --- | 1412 if (can_use_addressof) 1413 gen_mem_addressof (reg, decl, rescan); 1414 else 1415 put_reg_into_stack (function, reg, TREE_TYPE (decl), promoted_mode, 1416 decl_mode, volatilep, 0, usedp, 0); 1417 } 1418 else if (GET_CODE (reg) == CONCAT) 1419 { --- 6567 unchanged lines hidden --- |