Skip to content

Commit 0649a43

Browse files
target/arc: v2: rewrite translation functions for memory operations
Replace the existing auto-generated arc_gen_*() functions for all variants of LD, ST, PUSH, and POP instructions by hand-written ones. The new routines allocate fewer temporary registers and perform fewer operations. These changes have been validated by running the check-tcg and dcc.dg/dg.exp tests, as well as booting Linux for archs and hs5x CPUs. Signed-off-by: Artemiy Volkov <[email protected]>
1 parent 2218312 commit 0649a43

File tree

3 files changed

+228
-394
lines changed

3 files changed

+228
-394
lines changed

target/arc/arc-common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ typedef struct {
5959
uint8_t n_ops;
6060
uint8_t cc;
6161
uint8_t op;
62-
uint8_t aa;
63-
uint8_t zz;
62+
uint8_t aa : 2;
63+
uint8_t zz : 2;
6464
#define zz_as_data_size zz
6565
bool aq;
6666
bool rl;

target/arc/decoder-v2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ load_insninfo_if_valid_v2(uint64_t insn,
187187
ret.zz = 2;
188188
break;
189189
default:
190-
ret.zz = 4;
190+
ret.zz = 0;
191191
break;
192192
}
193193
}

0 commit comments

Comments
 (0)