aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorJeff Law <jlaw@ventanamicro.com>2023-11-02 07:25:39 -0600
committerJeff Law <jlaw@ventanamicro.com>2023-11-02 07:25:39 -0600
commit0f9f3fc885a1f830ff09a095e8c14919c2796a9d (patch)
treee3e9b5f782ebf50a752dc0782f1cc8292ae1b050 /libgcc
parentc71028c979d55f98b7727f9387bbe2f4ffe6de13 (diff)
downloadgcc-0f9f3fc885a1f830ff09a095e8c14919c2796a9d.zip
gcc-0f9f3fc885a1f830ff09a095e8c14919c2796a9d.tar.gz
gcc-0f9f3fc885a1f830ff09a095e8c14919c2796a9d.tar.bz2
[committed] Improve H8 sequences for single bit sign extractions
Spurred by Roger's recent work on ARC, this patch improves the code we generation for single bit sign extractions. The basic idea is to get the bit we want into C, the use a subx;ext.w;ext.l sequence to sign extend it in a GPR. For bits 0..15 we can use a bld instruction to get the bit we want into C. For bits 16..31, we can move the high word into the low word, then use bld. There's a couple special cases where we can shift the bit we want from the high word into C which is an instruction smaller. Not surprisingly most cases seen in newlib and the test suite are extractions from the low byte, HImode sign bit and top two bits of SImode. Regression tested on the H8 with no regressions. Installing on the trunk. gcc/ * config/h8300/combiner.md: Add new patterns for single bit sign extractions.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions