diff options
author | Mark Mitchell <mark@codesourcery.com> | 2001-07-12 07:50:58 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2001-07-12 07:50:58 +0000 |
commit | 7ed47c042e44ac0809d65ddfec988e1305067239 (patch) | |
tree | b85ad225ae4da23a9c79a8851514d356465de127 | |
parent | 4eab60c26988232bea0cd26bf50e9c33ee0445cb (diff) | |
download | gcc-7ed47c042e44ac0809d65ddfec988e1305067239.zip gcc-7ed47c042e44ac0809d65ddfec988e1305067239.tar.gz gcc-7ed47c042e44ac0809d65ddfec988e1305067239.tar.bz2 |
decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER for `register' variables with an asm-specification.
* decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
for `register' variables with an asm-specification.
From-SVN: r43963
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl.c | 9 |
2 files changed, 13 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 486533b..3d8f346 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2001-07-12 Mark Mitchell <mark@codesourcery.com> + + * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER + for `register' variables with an asm-specification. + 2001-07-11 Mark Mitchell <mark@codesourcery.com> * semantics.c (finish_asm_stmt): Mark the output operands diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 5de71508..c0e9b85 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -7806,7 +7806,14 @@ make_rtl_for_nonlocal_decl (decl, init, asmspec) /* Set the DECL_ASSEMBLER_NAME for the variable. */ if (asmspec) - SET_DECL_ASSEMBLER_NAME (decl, get_identifier (asmspec)); + { + SET_DECL_ASSEMBLER_NAME (decl, get_identifier (asmspec)); + /* The `register' keyword, when used together with an + asm-specification, indicates that the variable should be + placed in a particular register. */ + if (DECL_REGISTER (decl)) + DECL_C_HARD_REGISTER (decl) = 1; + } /* We don't create any RTL for local variables. */ if (DECL_FUNCTION_SCOPE_P (decl) && !TREE_STATIC (decl)) |