ULong s390_do_cvd(ULong binary);
ULong s390_do_ecag(ULong op2addr);
UInt s390_do_pfpo(UInt gpr0);
-void s390x_dirtyhelper_PPNO_query(VexGuestS390XState *guest_state, ULong r1, ULong r2);
-ULong s390x_dirtyhelper_PPNO_sha512(VexGuestS390XState *guest_state, ULong r1, ULong r2);
-void s390x_dirtyhelper_PPNO_sha512_load_param_block( void );
+
/* The various ways to compute the condition code. */
enum {
S390_CC_OP_BITWISE = 0,
#endif
-/*-----------------------------------------------------------------*/
-/*--- Dirty helper for Perform Pseudorandom number instruction ---*/
-/*-----------------------------------------------------------------*/
-
-/* Dummy helper that is needed to indicate load of parameter block.
- We have to use it because dirty helper cannot have two memory side
- effects.
- */
-void s390x_dirtyhelper_PPNO_sha512_load_param_block( void )
-{
-}
-
-#if defined(VGA_s390x)
-
-/* IMPORTANT!
- We return here bit mask where only supported functions are set to one.
- If you implement new functions don't forget the supported array.
- */
-void
-s390x_dirtyhelper_PPNO_query(VexGuestS390XState *guest_state, ULong r1, ULong r2)
-{
- ULong supported[2] = {0x9000000000000000ULL, 0x0000000000000000ULL};
- ULong *result = (ULong*) guest_state->guest_r1;
-
- result[0] = supported[0];
- result[1] = supported[1];
-}
-
-ULong
-s390x_dirtyhelper_PPNO_sha512(VexGuestS390XState *guest_state, ULong r1, ULong r2)
-{
- ULong* op1 = (ULong*) (((ULong)(&guest_state->guest_r0)) + r1 * sizeof(ULong));
- ULong* op2 = (ULong*) (((ULong)(&guest_state->guest_r0)) + r2 * sizeof(ULong));
-
- register ULong reg0 asm("0") = guest_state->guest_r0;
- register ULong reg1 asm("1") = guest_state->guest_r1;
- register ULong reg2 asm("2") = op1[0];
- register ULong reg3 asm("3") = op1[1];
- register ULong reg4 asm("4") = op2[0];
- register ULong reg5 asm("5") = op2[1];
-
- ULong cc = 0;
- asm volatile(".insn rre, 0xb93c0000, %%r2, %%r4\n"
- "ipm %[cc]\n"
- "srl %[cc], 28\n"
- : "+d"(reg0), "+d"(reg1),
- "+d"(reg2), "+d"(reg3),
- "+d"(reg4), "+d"(reg5),
- [cc] "=d"(cc)
- :
- : "cc", "memory");
-
- return cc;
-}
-
-#else
-
-void
-s390x_dirtyhelper_PPNO_query(VexGuestS390XState *guest_state, ULong r1, ULong r2)
-{
-}
-
-ULong
-s390x_dirtyhelper_PPNO_sha512(VexGuestS390XState *guest_state, ULong r1, ULong r2)
-{
- return 0;
-}
-
-#endif /* VGA_s390x */
/*---------------------------------------------------------------*/
/*--- end guest_s390_helpers.c ---*/
/*---------------------------------------------------------------*/
return "lcbb";
}
-/* Also known as "PRNO" */
static const HChar *
-s390_irgen_PPNO(UChar r1, UChar r2)
+s390_irgen_PRNO(UChar r1, UChar r2)
{
if (!s390_host_has_msa5) {
- emulation_failure(EmFail_S390X_ppno);
- return "ppno";
+ emulation_failure(EmFail_S390X_prno);
+ return "prno";
}
/* Check for obvious specification exceptions */
- s390_insn_assert("ppno", r1 % 2 == 0 && r2 % 2 == 0 && r1 != 0 && r2 != 0);
+ s390_insn_assert("prno", r1 % 2 == 0 && r2 % 2 == 0 && r1 != 0 && r2 != 0);
extension(S390_EXT_PRNO, r1 | (r2 << 4));
- return "ppno";
+ return "prno";
}
static const HChar *
{
if (!s390_host_has_dflt) {
emulation_failure(EmFail_S390X_dflt);
- return "ppno";
+ return "dfltcc";
}
/* Check for obvious specification exceptions */
case 0xb93a: s390_format_RRE_RR(s390_irgen_KDSA, RRE_r1(ovl),
RRE_r2(ovl)); goto ok;
case 0xb93b: s390_format_E(s390_irgen_NNPA); goto ok;
- case 0xb93c: s390_format_RRE_RR(s390_irgen_PPNO, RRE_r1(ovl),
+ case 0xb93c: s390_format_RRE_RR(s390_irgen_PRNO, RRE_r1(ovl),
RRE_r2(ovl)); goto ok;
case 0xb93e: s390_format_RRE_RR(s390_irgen_KIMD, RRE_r1(ovl),
RRE_r2(ovl)); goto ok;
case EmFail_S390X_vx:
return "Encountered an instruction that requires the vector facility.\n"
" That facility is not available on this host";
- case EmFail_S390X_ppno:
- return "Instruction ppno is not supported on this host.";
+ case EmFail_S390X_prno:
+ return "Instruction prno is not supported on this host.";
case EmFail_S390X_vxe:
return "Encountered an instruction that requires the vector-extensions"
" facility 1.\n"
S390_PFPO_D128_TO_F128 = 0x01070A
} s390_pfpo_function_t;
-/* PPNO function code as it is encoded in bits [57:63] of GR0
- when PPNO insn is executed. */
-typedef enum
-{
- S390_PPNO_QUERY = 0x00,
- S390_PPNO_SHA512_GEN = 0x03,
- S390_PPNO_SHA512_SEED = 0x83
-} s390_ppno_function_t;
-
-/* Size of parameter block for PPNO functions.
- All values are in bytes.
- */
-#define S390_PPNO_PARAM_BLOCK_SIZE_QUERY 16
-#define S390_PPNO_PARAM_BLOCK_SIZE_SHA512 240
-
-/* Maximum length of modified memory for PPNO functions.
- All values are in bytes.
-*/
-#define S390_PPNO_MAX_SIZE_SHA512_SEED 512
-#define S390_PPNO_MAX_SIZE_SHA512_GEN 64
-
/* The length of the longest mnemonic: locfhrnhe */
#define S390_MAX_MNEMONIC_LEN 9
/* some insn needs vector facility which is not available on this host */
EmFail_S390X_vx,
- /* ppno insn is not supported on this host */
- EmFail_S390X_ppno,
+ /* prno insn is not supported on this host */
+ EmFail_S390X_prno,
/* insn needs vector-enhancements facility 1 which is not available on
this host */