aboutsummaryrefslogtreecommitdiff
path: root/gcc/value-range.cc
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2022-08-30 15:43:48 +0100
committerRichard Sandiford <richard.sandiford@arm.com>2022-08-30 15:43:48 +0100
commit1025025b612d632920fe710bb58d36e4d43f3220 (patch)
tree5ea7660a3c830874be57000418cad382253f2dc5 /gcc/value-range.cc
parent61c4c989034548f481d1f10198447be27fb9a55f (diff)
downloadgcc-1025025b612d632920fe710bb58d36e4d43f3220.zip
gcc-1025025b612d632920fe710bb58d36e4d43f3220.tar.gz
gcc-1025025b612d632920fe710bb58d36e4d43f3220.tar.bz2
expmed: Fix store_bit_field_1 subreg offset
store_bit_field_1 tries to convert a field assignment into a subreg assignment. Normally it must check that the field occupies a full word (or more specifically, a full REGMODE_NATURAL_SIZE chunk), so that writing to the subreg doesn't clobber any other fields. But it can skip that check if the structure is known to be in an undefined state. The idea was that, in the undefined case, we could rely on simplify_gen_subreg to do the check for a valid subreg, rather than having to repeat the required endianness logic in the caller. Before the addition of the undefined case, the code could use regnum * regsize to get the byte offset, where regnum came from checking that the start was word-aligned. In the undefined case we need to calculate the byte offset explicitly. gcc/ * expmed.cc (store_bit_field_1): Fix byte offset calculation for undefined structures.
Diffstat (limited to 'gcc/value-range.cc')
0 files changed, 0 insertions, 0 deletions