macros.h (1dcdc92c72af5311666df64f5f04d6600af262ed) macros.h (1e536334ccb0a1606f814a38a4996b3b818e9fab)
1/*
2 * Copyright(c) 2019-2022 Qualcomm Innovation Center, Inc. All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *

--- 80 unchanged lines hidden (view full) ---

89 * For qemu, we look for a load in slot 0 when there is a store in slot 1
90 * in the same packet. When we see this, we call a helper that probes the
91 * load to make sure it doesn't fault. Then, we process the store ahead of
92 * the actual load.
93
94 */
95#define CHECK_NOSHUF(VA, SIZE) \
96 do { \
1/*
2 * Copyright(c) 2019-2022 Qualcomm Innovation Center, Inc. All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *

--- 80 unchanged lines hidden (view full) ---

89 * For qemu, we look for a load in slot 0 when there is a store in slot 1
90 * in the same packet. When we see this, we call a helper that probes the
91 * load to make sure it doesn't fault. Then, we process the store ahead of
92 * the actual load.
93
94 */
95#define CHECK_NOSHUF(VA, SIZE) \
96 do { \
97 if (insn->slot == 0 && pkt->pkt_has_store_s1) { \
97 if (insn->slot == 0 && ctx->pkt->pkt_has_store_s1) { \
98 probe_noshuf_load(VA, SIZE, ctx->mem_idx); \
98 probe_noshuf_load(VA, SIZE, ctx->mem_idx); \
99 process_store(ctx, pkt, 1); \
99 process_store(ctx, 1); \
100 } \
101 } while (0)
102
103#define CHECK_NOSHUF_PRED(GET_EA, SIZE, PRED) \
104 do { \
105 TCGLabel *label = gen_new_label(); \
106 tcg_gen_brcondi_tl(TCG_COND_EQ, PRED, 0, label); \
107 GET_EA; \
100 } \
101 } while (0)
102
103#define CHECK_NOSHUF_PRED(GET_EA, SIZE, PRED) \
104 do { \
105 TCGLabel *label = gen_new_label(); \
106 tcg_gen_brcondi_tl(TCG_COND_EQ, PRED, 0, label); \
107 GET_EA; \
108 if (insn->slot == 0 && pkt->pkt_has_store_s1) { \
108 if (insn->slot == 0 && ctx->pkt->pkt_has_store_s1) { \
109 probe_noshuf_load(EA, SIZE, ctx->mem_idx); \
110 } \
111 gen_set_label(label); \
109 probe_noshuf_load(EA, SIZE, ctx->mem_idx); \
110 } \
111 gen_set_label(label); \
112 if (insn->slot == 0 && pkt->pkt_has_store_s1) { \
113 process_store(ctx, pkt, 1); \
112 if (insn->slot == 0 && ctx->pkt->pkt_has_store_s1) { \
113 process_store(ctx, 1); \
114 } \
115 } while (0)
116
117#define MEM_LOAD1s(DST, VA) \
118 do { \
119 CHECK_NOSHUF(VA, 1); \
120 tcg_gen_qemu_ld8s(DST, VA, ctx->mem_idx); \
121 } while (0)

--- 612 unchanged lines hidden ---
114 } \
115 } while (0)
116
117#define MEM_LOAD1s(DST, VA) \
118 do { \
119 CHECK_NOSHUF(VA, 1); \
120 tcg_gen_qemu_ld8s(DST, VA, ctx->mem_idx); \
121 } while (0)

--- 612 unchanged lines hidden ---