Skip to content

Commit

Permalink
target/hppa: Implement pa2.0 data prefetch instructions
Browse files Browse the repository at this point in the history
These are aliased onto the normal integer loads to %g0.
Since we don't emulate caches, prefetch is a nop.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed Nov 7, 2023
1 parent 5411112 commit b5caa17
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion target/hppa/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -2976,7 +2976,15 @@ static bool trans_permh(DisasContext *ctx, arg_permh *a)

static bool trans_ld(DisasContext *ctx, arg_ldst *a)
{
if (!ctx->is_pa20 && a->size > MO_32) {
if (ctx->is_pa20) {
/*
* With pa20, LDB, LDH, LDW, LDD to %g0 are prefetches.
* Any base modification still occurs.
*/
if (a->t == 0) {
return trans_nop_addrx(ctx, a);
}
} else if (a->size > MO_32) {
return gen_illegal(ctx);
}
return do_load(ctx, a->t, a->b, a->x, a->scale ? a->size : 0,
Expand Down

0 comments on commit b5caa17

Please sign in to comment.