HChar reg_t = Q ? 'q' : 'd';
if (Q) {
- putQReg(dreg, triop(Iop_ExtractV128, getQReg(nreg),
- getQReg(mreg), mkU8(imm4)), condT);
+ putQReg(dreg, triop(Iop_SliceV128, /*hiV128*/getQReg(mreg),
+ /*loV128*/getQReg(nreg), mkU8(imm4)), condT);
} else {
- putDRegI64(dreg, triop(Iop_Extract64, getDRegI64(nreg),
- getDRegI64(mreg), mkU8(imm4)), condT);
+ putDRegI64(dreg, triop(Iop_Slice64, /*hiI64*/getDRegI64(mreg),
+ /*loI64*/getDRegI64(nreg), mkU8(imm4)), condT);
}
DIP("vext.8 %c%d, %c%d, %c%d, #%d\n", reg_t, dreg, reg_t, nreg,
reg_t, mreg, imm4);
IRTriop *triop = e->Iex.Triop.details;
switch (triop->op) {
- case Iop_Extract64: {
+ case Iop_Slice64: {
HReg res = newVRegD(env);
- HReg argL = iselNeon64Expr(env, triop->arg1);
- HReg argR = iselNeon64Expr(env, triop->arg2);
+ HReg argL = iselNeon64Expr(env, triop->arg2);
+ HReg argR = iselNeon64Expr(env, triop->arg1);
UInt imm4;
if (triop->arg3->tag != Iex_Const ||
typeOfIRExpr(env->type_env, triop->arg3) != Ity_I8) {
IRTriop *triop = e->Iex.Triop.details;
switch (triop->op) {
- case Iop_ExtractV128: {
+ case Iop_SliceV128: {
HReg res = newVRegV(env);
- HReg argL = iselNeonExpr(env, triop->arg1);
- HReg argR = iselNeonExpr(env, triop->arg2);
+ HReg argL = iselNeonExpr(env, triop->arg2);
+ HReg argR = iselNeonExpr(env, triop->arg1);
UInt imm4;
if (triop->arg3->tag != Iex_Const ||
typeOfIRExpr(env->type_env, triop->arg3) != Ity_I8) {
case Iop_SetElem16x4: vex_printf("SetElem16x4"); return;
case Iop_SetElem32x2: vex_printf("SetElem32x2"); return;
- case Iop_Extract64: vex_printf("Extract64"); return;
- case Iop_ExtractV128: vex_printf("ExtractV128"); return;
+ case Iop_Slice64: vex_printf("Slice64"); return;
+ case Iop_SliceV128: vex_printf("SliceV128"); return;
case Iop_Perm8x16: vex_printf("Perm8x16"); return;
case Iop_Perm32x4: vex_printf("Perm32x4"); return;
case Iop_SetElem32x2:
TERNARY(Ity_I64, Ity_I8, Ity_I32, Ity_I64);
- case Iop_Extract64:
+ case Iop_Slice64:
TERNARY(Ity_I64, Ity_I64, Ity_I8, Ity_I64);
- case Iop_ExtractV128:
+ case Iop_SliceV128:
TERNARY(Ity_V128, Ity_V128, Ity_I8, Ity_V128);
case Iop_BCDAdd:
/* DUPLICATING -- copy value to all lanes */
Iop_Dup8x8, Iop_Dup16x4, Iop_Dup32x2,
- /* EXTRACT -- copy 8-arg3 highest bytes from arg1 to 8-arg3 lowest bytes
- of result and arg3 lowest bytes of arg2 to arg3 highest bytes of
- result.
- It is a triop: (I64, I64, I8) -> I64 */
- /* Note: the arm back-end handles only constant third argumnet. */
- Iop_Extract64,
+ /* SLICE -- produces the lowest 64 bits of (arg1:arg2) >> (8 * arg3).
+ arg3 is a shift amount in bytes and may be between 0 and 8
+ inclusive. When 0, the result is arg2; when 8, the result is arg1.
+ Not all back ends handle all values. The arm32 and arm64 back
+ ends handle only immediate arg3 values. */
+ Iop_Slice64, // (I64, I64, I8) -> I64
/* REVERSE the order of chunks in vector lanes. Chunks must be
smaller than the vector lanes (obviously) and so may be 8-,
/* DUPLICATING -- copy value to all lanes */
Iop_Dup8x16, Iop_Dup16x8, Iop_Dup32x4,
- /* EXTRACT -- copy 16-arg3 highest bytes from arg1 to 16-arg3 lowest bytes
- of result and arg3 lowest bytes of arg2 to arg3 highest bytes of
- result.
- It is a triop: (V128, V128, I8) -> V128 */
- /* Note: the ARM back end handles only constant arg3 in this operation. */
- Iop_ExtractV128,
+ /* SLICE -- produces the lowest 128 bits of (arg1:arg2) >> (8 * arg3).
+ arg3 is a shift amount in bytes and may be between 0 and 16
+ inclusive. When 0, the result is arg2; when 16, the result is arg1.
+ Not all back ends handle all values. The arm64 back
+ end handles only immediate arg3 values. */
+ Iop_SliceV128, // (V128, V128, I8) -> V128
/* REVERSE the order of chunks in vector lanes. Chunks must be
smaller than the vector lanes (obviously) and so may be 8-,