diff options
author | Takayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp> | 2025-06-17 15:56:52 +0900 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2025-06-22 02:50:20 -0700 |
commit | b0419798447ae25de2f58d1a695db6dadb5d8547 (patch) | |
tree | 0adfdb7c069dbbf4a758f24aa4b0c06f4444974c /gcc/testsuite | |
parent | 00e551bfbd4023047a42ccb022a35707b8ef42e6 (diff) | |
download | gcc-master.zip gcc-master.tar.gz gcc-master.tar.bz2 |
This patch implements bitfield insertion MD pattern using the DEPBITS
machine instruction, the counterpart of the EXTUI instruction, if
available.
/* example */
struct foo {
unsigned int b:10;
unsigned int r:11;
unsigned int g:11;
};
void test(struct foo *p) {
p->g >>= 1;
}
;; result (endianness: little)
test:
entry sp, 32
l32i.n a8, a2, 0
extui a9, a8, 1, 10
depbits a8, a9, 0, 11
s32i.n a8, a2, 0
retw.n
gcc/ChangeLog:
* config/xtensa/xtensa.h (TARGET_DEPBITS): New macro.
* config/xtensa/xtensa.md (insvsi): New insn pattern.
Diffstat (limited to 'gcc/testsuite')
0 files changed, 0 insertions, 0 deletions