diff options
author | Richard Sandiford <rsandifo@redhat.com> | 2003-11-29 18:54:43 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2003-11-29 18:54:43 +0000 |
commit | 9c8586819806fba3b8acd448a68424aa41d832c8 (patch) | |
tree | 854060a2992c75a90b555b47958be9040f4c5d60 /gcc/stmt.c | |
parent | 2d25605a546af33df11715eff5cc16393c0b2257 (diff) | |
download | gcc-9c8586819806fba3b8acd448a68424aa41d832c8.zip gcc-9c8586819806fba3b8acd448a68424aa41d832c8.tar.gz gcc-9c8586819806fba3b8acd448a68424aa41d832c8.tar.bz2 |
stmt.c (expand_asm_operands): Check whether force_const_mem succeeded.
* stmt.c (expand_asm_operands): Check whether force_const_mem
succeeded.
testsuite/
* gcc.dg/tls/asm-1.C: New test.
From-SVN: r74035
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r-- | gcc/stmt.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -1712,13 +1712,16 @@ expand_asm_operands (tree string, tree outputs, tree inputs, if (CONSTANT_P (op)) { - op = force_const_mem (TYPE_MODE (type), op); - op = validize_mem (op); + rtx mem = force_const_mem (TYPE_MODE (type), op); + if (mem) + op = validize_mem (mem); + else + op = force_reg (TYPE_MODE (type), op); } - else if (GET_CODE (op) == REG - || GET_CODE (op) == SUBREG - || GET_CODE (op) == ADDRESSOF - || GET_CODE (op) == CONCAT) + if (GET_CODE (op) == REG + || GET_CODE (op) == SUBREG + || GET_CODE (op) == ADDRESSOF + || GET_CODE (op) == CONCAT) { tree qual_type = build_qualified_type (type, (TYPE_QUALS (type) |