Skip to content

Commit

Permalink
target-arm/helper.c: Allow const opaques in arm CP
Browse files Browse the repository at this point in the history
Allow for defining const opaque data in ARM CP register definitions by
setting .opaque = foo. If non null opaque is passed into
define_one_arm_cp_reg_with_opaque then that opaque will take
precedence, otherwise if null opaque is passed, the original opaque
data will be used.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: cf0a3ac3438d97464240db9f5f4ef1585cbc1d77.1373429432.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
pete128 authored and pm215 committed Jul 15, 2013
1 parent 97ce8d6 commit 204a9c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion target-arm/helper.c
Expand Up @@ -1608,7 +1608,9 @@ void define_one_arm_cp_reg_with_opaque(ARMCPU *cpu,
ARMCPRegInfo *r2 = g_memdup(r, sizeof(ARMCPRegInfo));
int is64 = (r->type & ARM_CP_64BIT) ? 1 : 0;
*key = ENCODE_CP_REG(r->cp, is64, r->crn, crm, opc1, opc2);
r2->opaque = opaque;
if (opaque) {
r2->opaque = opaque;
}
/* Make sure reginfo passed to helpers for wildcarded regs
* has the correct crm/opc1/opc2 for this reg, not CP_ANY:
*/
Expand Down

0 comments on commit 204a9c4

Please sign in to comment.