aboutsummaryrefslogtreecommitdiff
path: root/libgcc/fixed-bit.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2024-12-18 11:50:26 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2024-12-18 11:50:26 +0100
commit35c4a383d6d8f7a9a094d364201daf0d098e4f42 (patch)
tree3effd0285aae9c24528c30ce4712c70536220968 /libgcc/fixed-bit.c
parent74d6a676034b3ab20c387f12f19f5597e4f1c9fa (diff)
downloadgcc-35c4a383d6d8f7a9a094d364201daf0d098e4f42.zip
gcc-35c4a383d6d8f7a9a094d364201daf0d098e4f42.tar.gz
gcc-35c4a383d6d8f7a9a094d364201daf0d098e4f42.tar.bz2
inline-asm: Add - constraint modifier support for toplevel extended asm [PR41045]
The following patch adds - constraint modifier support (only in toplevel asms), which one can use to allow i, s and n constraint to accept SYMBOL_REFs even with -fpic. So, the recommended way mark toplevel asm as defining some symbol would be ":" constraint (usually with cc modifier in the pattern), while to mark toplevel asm as using some symbol (again, either function or variable), one would use "-s" constraint again with address of that function or variable. 2024-12-18 Jakub Jelinek <jakub@redhat.com> PR c/41045 gcc/ * stmt.cc (parse_output_constraint, parse_input_constraint): Handle - modifier. * recog.h (raw_constraint_p): Declare. * recog.cc (raw_constraint_p): New variable. (asm_operand_ok, constrain_operands): Handle - modifier. * common.md (i, s, n): For raw_constraint_p don't require LEGITIMATE_PIC_OPERAND_P. * doc/md.texi: Document - constraint modifier. gcc/c/ * c-typeck.cc (build_asm_expr): Reject - constraint modifier inside of a function. gcc/cp/ * semantics.cc (finish_asm_stmt): Reject - constraint modifier inside of a function. gcc/testsuite/ * c-c++-common/toplevel-asm-4.c: Add missing %cc2 use in template, add bar, x, &y operands with "-i" and "-s" constraints. (x, y): New variables. (bar): Declare. * c-c++-common/toplevel-asm-7.c: New test. * c-c++-common/toplevel-asm-8.c: New test.
Diffstat (limited to 'libgcc/fixed-bit.c')
0 files changed, 0 insertions, 0 deletions