aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2022-12-12 15:16:50 +0000
committerTamar Christina <tamar.christina@arm.com>2022-12-12 15:17:24 +0000
commitdc582d2ef32e2d3723c68d111f4e49607631f34d (patch)
tree47d533c626f633e61a78cdc46a2a4dbc59c42951 /gcc/rust
parent2cba118e538ba0b7582af7f9fb5ba2dfbb772f8e (diff)
downloadgcc-dc582d2ef32e2d3723c68d111f4e49607631f34d.zip
gcc-dc582d2ef32e2d3723c68d111f4e49607631f34d.tar.gz
gcc-dc582d2ef32e2d3723c68d111f4e49607631f34d.tar.bz2
middle-end: Add new tbranch optab to add support for bit-test-and-branch operations
This adds a new test-and-branch optab that can be used to do a conditional test of a bit and branch. This is similar to the cbranch optab but instead can test any arbitrary bit inside the register. This patch recognizes boolean comparisons and single bit mask tests. gcc/ChangeLog: * dojump.cc (do_jump): Pass along value. (do_jump_by_parts_greater_rtx): Likewise. (do_jump_by_parts_zero_rtx): Likewise. (do_jump_by_parts_equality_rtx): Likewise. (do_compare_rtx_and_jump): Likewise. (do_compare_and_jump): Likewise. * dojump.h (do_compare_rtx_and_jump): New. * optabs.cc (emit_cmp_and_jump_insn_1): Refactor to take optab to check. (validate_test_and_branch): New. (emit_cmp_and_jump_insns): Optiobally take a value, and when value is supplied then check if it's suitable for tbranch. * optabs.def (tbranch_eq$a4, tbranch_ne$a4): New. * doc/md.texi (tbranch_@var{op}@var{mode}4): Document it. * optabs.h (emit_cmp_and_jump_insns): New. * tree.h (tree_zero_one_valued_p): New.
Diffstat (limited to 'gcc/rust')
0 files changed, 0 insertions, 0 deletions