Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Bug6652 #377

Closed
wants to merge 4 commits into from

5 participants

@MartinNowak
Collaborator

http://d.puremagic.com/issues/show_bug.cgi?id=6652

  • fixes unexpected loop index changing when using non-ref foreach argument
  • explicitly allow ref index to alter loop index
  • this is now consistent with the usual foreach args behaving like a function args

This fix breaks code that depends on this behavior.
There is an accompanying pull request for phobos, which should be merge first.

@MartinNowak
Collaborator

phobos pull:
D-Programming-Language/phobos#255

P.S.:

  • I've double checked that a simple size_t index is optimized out if unaltered
@yebblies
Collaborator

This patch is causing one of the iasm tests to fail in the autotester.
The output of the test is here
Also, if you add a line like requires: phobos git://github.com/your_username/your_phobos_repo.git branch_name to the pull request description the autotester will merge that branch into phobos before testing.

@MartinNowak
Collaborator

Thanks I plainly forgot the 32-bit iasm fixes.
Will fix this soon.

MartinNowak added some commits
@MartinNowak MartinNowak regression test for Bug6652 24fbc11
@MartinNowak MartinNowak create a copy for non-ref arg in ForeachRangeStatement
 - resolves Bug6652
 - additional variable is optimized out if unaltered
1d5e889
@MartinNowak MartinNowak also create a copy for non-ref key arg in ForeachStatement a9963e3
@MartinNowak MartinNowak fix iasm64 test
 - the stack size changed due to the foreach changes
 - moved comparison into separate function and added
   0x20 to RBP relative addresses
c44257f
@WalterBright

This one is fairly controversial - see http://d.puremagic.com/issues/show_bug.cgi?id=6652

@andralex
Owner

(background: I'm doing a review of pull requests < 1000 as they tend to be controversial)

I'm against this because it changes behavior from one that compiles, runs, and has certain semantics, to one that also compiles and runs, but has different semantics. Reasonable people can be expected to disagree over the semantics, and therefore may guess wrong and be surprised at either the existing semantics, the semantics proposed by this diff, or the decision to change from one to another.

I am much more in favor of tightening the screws - either reject, to the extent possible, changes to the loop variable, or simply leave things as they are.

@9rnsr
Collaborator

I've posted three pull requests for the bug 6652.
These changes are for the correct deprecation phases (warning -> deprecated -> changing semantics), and it's already started from 2.060. So in current, modifying non-ref foreach loop variable is warned (with -w switch).

#1008 (already merged in 2.060)
#1009
#1010

Therefore, what I want to ask is: When the warning will be changed to the deprecation?


On the other hand, this pull request has exhaustive test case, so I'd like to copy it to pull#1010 if @dawgfoto agrees.

@braddr braddr referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@braddr braddr referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@WalterBright

Is there any reason to keep this around given 94nsr's staged pull requests?

@MartinNowak
Collaborator

On the other hand, this pull request has exhaustive test case, so I'd like to copy it to pull#1010 if @dawgfoto agrees.

Please go ahead and take what you consider useful for #1010.

@AlexeyProkhin AlexeyProkhin referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 26, 2011
  1. @MartinNowak
  2. @MartinNowak

    create a copy for non-ref arg in ForeachRangeStatement

    MartinNowak authored
     - resolves Bug6652
     - additional variable is optimized out if unaltered
  3. @MartinNowak
  4. @MartinNowak

    fix iasm64 test

    MartinNowak authored
     - the stack size changed due to the foreach changes
     - moved comparison into separate function and added
       0x20 to RBP relative addresses
This page is out of date. Refresh to see the latest.
View
40 src/statement.c
@@ -1597,13 +1597,15 @@ Statement *ForeachStatement::semantic(Scope *sc)
Parameter *arg = arguments->tdata()[i];
Type *argtype = arg->type->semantic(loc, sc);
VarDeclaration *var;
+ int iskey = dim == 2 && i == 0;
- var = new VarDeclaration(loc, argtype, arg->ident, NULL);
+ Identifier *id = !iskey || (arg->storageClass & STCref) ? arg->ident : Lexer::uniqueId("__key");
+ var = new VarDeclaration(loc, argtype, id, NULL);
var->storage_class |= STCforeach;
var->storage_class |= arg->storageClass & (STCin | STCout | STCref | STC_TYPECTOR);
if (var->storage_class & (STCref | STCout))
var->storage_class |= STCnodtor;
- if (dim == 2 && i == 0)
+ if (iskey)
{ key = var;
//var->storage_class |= STCfinal;
}
@@ -1668,11 +1670,25 @@ Statement *ForeachStatement::semantic(Scope *sc)
// key += 1
increment = new AddAssignExp(loc, new VarExp(loc, key), new IntegerExp(1));
+ Statements *bodyinit = new Statements;
+ if (dim == 2 && !(arguments->tdata()[0]->storageClass & STCref))
+ {
+ // key = __key
+ bodyinit->reserve(3);
+ Parameter *arg = arguments->tdata()[0];
+ ExpInitializer *ie = new ExpInitializer(loc, new VarExp(loc, key));
+ VarDeclaration *argcopy = new VarDeclaration(loc, arg->type, arg->ident, ie);
+ bodyinit->push(new ExpStatement(loc, argcopy));
+ }
+ else
+ bodyinit->reserve(2);
+
// T value = tmp[key];
value->init = new ExpInitializer(loc, new IndexExp(loc, new VarExp(loc, tmp), new VarExp(loc, key)));
- Statement *ds = new ExpStatement(loc, value);
+ bodyinit->push(new ExpStatement(loc, value));
- body = new CompoundStatement(loc, ds, body);
+ bodyinit->push(body);
+ body = new CompoundStatement(loc, bodyinit);
s = new ForStatement(loc, forinit, cond, increment, body);
s = s->semantic(sc);
@@ -2270,12 +2286,13 @@ Statement *ForeachRangeStatement::semantic(Scope *sc)
* for (auto tmp = lwr, auto key = upr; key-- > tmp;)
*/
+ Identifier *idkey = arg->storageClass & STCref ? arg->ident : Lexer::uniqueId("__key");
ExpInitializer *ie = new ExpInitializer(loc, (op == TOKforeach) ? lwr : upr);
- key = new VarDeclaration(loc, arg->type, arg->ident, ie);
+ key = new VarDeclaration(loc, arg->type, idkey, ie);
- Identifier *id = Lexer::uniqueId("__limit");
+ Identifier *idtmp = Lexer::uniqueId("__limit");
ie = new ExpInitializer(loc, (op == TOKforeach) ? upr : lwr);
- VarDeclaration *tmp = new VarDeclaration(loc, arg->type, id, ie);
+ VarDeclaration *tmp = new VarDeclaration(loc, arg->type, idtmp, ie);
Statements *cs = new Statements();
// Keep order of evaluation as lwr, then upr
@@ -2318,6 +2335,15 @@ Statement *ForeachRangeStatement::semantic(Scope *sc)
//increment = new AddAssignExp(loc, new VarExp(loc, key), new IntegerExp(1));
increment = new PreExp(TOKpreplusplus, loc, new VarExp(loc, key));
+ if (!(arg->storageClass & STCref))
+ {
+ ExpInitializer *ie = new ExpInitializer(loc, new VarExp(loc, key));
+ VarDeclaration *argcopy = new VarDeclaration(loc, arg->type, arg->ident, ie);
+ Statement *ds = new ExpStatement(loc, argcopy);
+
+ body = new CompoundStatement(loc, ds, body);
+ }
+
ForStatement *fs = new ForStatement(loc, forinit, cond, increment, body);
s = fs->semantic(sc);
return s;
View
103 test/runnable/foreach5.d
@@ -107,6 +107,108 @@ void test7004()
}
/***************************************/
+// 6652
+
+void test6652()
+{
+ size_t sum;
+
+ foreach (i; 0 .. 10)
+ sum += i++; // 0123456789
+ assert(sum == 45);
+
+ sum = 0;
+ foreach (ref i; 0 .. 10)
+ sum += i++; // 02468
+ assert(sum == 20);
+
+ sum = 0;
+ foreach_reverse (i; 0 .. 10)
+ sum += i--; // 9876543210
+ assert(sum == 45);
+
+ sum = 0;
+ foreach_reverse (ref i; 0 .. 10)
+ sum += i--; // 97531
+ assert(sum == 25);
+
+ enum ary = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
+ sum = 0;
+ foreach (i, v; ary)
+ {
+ assert(i == v);
+ sum += i++; // 0123456789
+ }
+ assert(sum == 45);
+
+ sum = 0;
+ foreach (ref i, v; ary)
+ {
+ assert(i == v);
+ sum += i++; // 02468
+ }
+ assert(sum == 20);
+
+ sum = 0;
+ foreach_reverse (i, v; ary)
+ {
+ assert(i == v);
+ sum += i--; // 9876543210
+ }
+ assert(sum == 45);
+
+ sum = 0;
+ foreach_reverse (ref i, v; ary)
+ {
+ assert(i == v);
+ sum += i--; // 97531
+ }
+ assert(sum == 25);
+
+ static struct Iter
+ {
+ ~this()
+ {
+ ++_dtorCount;
+ }
+
+ bool opCmp(ref const Iter rhs)
+ {
+ return _pos == rhs._pos;
+ }
+
+ void opUnary(string op)() if(op == "++" || op == "--")
+ {
+ mixin(op ~ q{_pos;});
+ }
+
+ size_t _pos;
+ static size_t _dtorCount;
+ }
+
+ Iter._dtorCount = sum = 0;
+ foreach (v; Iter(0) .. Iter(10))
+ sum += v._pos++; // 0123456789
+ assert(sum == 45 && Iter._dtorCount == 12);
+
+ Iter._dtorCount = sum = 0;
+ foreach (ref v; Iter(0) .. Iter(10))
+ sum += v._pos++; // 02468
+ assert(sum == 20 && Iter._dtorCount == 2);
+
+ // additional dtor calls due to unnecessary postdecrements
+ Iter._dtorCount = sum = 0;
+ foreach_reverse (v; Iter(0) .. Iter(10))
+ sum += v._pos--; // 9876543210
+ assert(sum == 45 && Iter._dtorCount >= 12);
+
+ Iter._dtorCount = sum = 0;
+ foreach_reverse (ref v; Iter(0) .. Iter(10))
+ sum += v._pos--; // 97531
+ assert(sum == 25 && Iter._dtorCount >= 2);
+}
+
+/***************************************/
int main()
{
@@ -114,6 +216,7 @@ int main()
test3187();
test5605();
test7004();
+ test6652();
printf("Success\n");
return 0;
View
371 test/runnable/iasm.d
@@ -17,6 +17,27 @@ struct M64 { int a,b; };
/****************************************************/
+void compareBytes(ubyte *p, ubyte[] data, size_t line = __LINE__)
+{
+ if (p[0 .. data.length] != data)
+ {
+ import core.stdc.stdio;
+
+ size_t pos;
+ while (pos < data.length)
+ {
+ if (p[pos] != data[pos])
+ break;
+ ++pos;
+ }
+ printf("iasm.d(%d): asm mismatch\n", line);
+ printf("data[%d] = 0x%02x, should be 0x%02x\n", pos, p[pos], data[pos]);
+ assert(0);
+ }
+}
+
+/****************************************************/
+
void test1()
{
int foo;
@@ -206,10 +227,8 @@ L1:
pop EBX ;
mov p[EBP],EBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
@@ -244,10 +263,8 @@ L1: ;
pop EBX ;
mov p[EBP],EBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
@@ -353,10 +370,8 @@ L1: ;
pop EBX ;
mov p[EBP],EBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
@@ -429,10 +444,8 @@ L1: ;
pop EBX ;
mov p[EBP],EBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
@@ -691,11 +704,8 @@ L1: ;
pop EBX ;
mov p[EBP],EBX ;
}
- for (i = 0; i < data.length; i++)
- {
- //printf("p[%d] = x%02x, data = x%02x\n", i, p[i], data[i]);
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
@@ -1106,11 +1116,8 @@ L1: ;
pop EBX ;
mov p[EBP],EBX ;
}
- for (i = 0; i < data.length; i++)
- {
- //printf("[%d] = %02x %02x\n", i, p[i], data[i]);
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
@@ -1857,10 +1864,8 @@ L1: ;
pop EBX ;
mov p[EBP],EBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
/****************************************************/
@@ -1978,10 +1983,8 @@ L1: ;
pop EBX ;
mov p[EBP],EBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
@@ -2020,10 +2023,8 @@ L1:
pop EBX ;
mov p[EBP],EBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
@@ -2077,10 +2078,8 @@ L1:
pop EBX ;
mov p[EBP],EBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
@@ -2149,10 +2148,8 @@ L1:
pop EBX ;
mov p[EBP],EBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
@@ -2200,10 +2197,8 @@ L1:
pop EBX ;
mov p[EBP],EBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
@@ -2229,10 +2224,8 @@ L1:
pop EBX ;
mov p[EBP],EBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
@@ -2330,10 +2323,8 @@ L1: ;
pop EBX ;
mov p[EBP],EBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
/****************************************************/
@@ -2511,10 +2502,8 @@ L1: ;
pop EBX ;
mov p[EBP],EBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
/****************************************************/
@@ -2678,10 +2667,8 @@ L1: ;
pop EBX ;
mov p[EBP],EBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
@@ -2961,10 +2948,8 @@ L1: ;
pop EBX ;
mov p[EBP],EBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
@@ -3058,10 +3043,8 @@ L1: ;
pop EBX ;
mov p[EBP],EBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
@@ -3098,10 +3081,8 @@ L1: ;
pop EBX ;
mov p[EBP],EBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
@@ -3575,10 +3556,8 @@ L1: ;
pop EBX ;
mov p[EBP],EBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
@@ -3827,10 +3806,8 @@ L1: ;
pop EBX ;
mov p[EBP],EBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
@@ -3857,7 +3834,7 @@ void test52()
0xF7, 0xD8, // neg EAX
0xF6, 0xDC, // neg AH
- 0xF7, 0x5D, 0xe8, // neg dword ptr -8[EBP]
+ 0xF7, 0x5D, 0xF8, // neg dword ptr -8[EBP]
0xF6, 0x1B, // neg byte ptr [EBX]
];
@@ -3880,11 +3857,7 @@ L1: pop EAX ;
mov p[EBP],EAX ;
}
- foreach (i,b; data)
- {
- //printf("data[%d] = 0x%02x, should be 0x%02x\n", i, p[i], b);
- assert(p[i] == b);
- }
+ compareBytes(p, data);
}
/****************************************************/
@@ -3952,11 +3925,7 @@ L1: pop EAX ;
mov p[EBP],EAX ;
}
- foreach (i,b; data)
- {
- //printf("data[%d] = 0x%02x, should be 0x%02x\n", i, p[i], b);
- assert(p[i] == b);
- }
+ compareBytes(p, data);
}
/****************************************************/
@@ -4015,11 +3984,7 @@ L1: pop EAX;
mov p[EBP],EAX;
}
- foreach (i,b; data)
- {
- //printf("data[%d] = 0x%02x, should be 0x%02x\n", i, p[i], b);
- assert(p[i] == b);
- }
+ compareBytes(p, data);
}
/****************************************************/
@@ -4065,11 +4030,7 @@ L1: pop EAX;
mov p[EBP],EAX;
}
- foreach (i,b; data)
- {
- //printf("data[%d] = 0x%02x, should be 0x%02x\n", i, p[i], b);
- assert(p[i] == b);
- }
+ compareBytes(p, data);
}
/****************************************************/
@@ -4113,68 +4074,68 @@ void test57()
[
0x0F, 0x3A, 0x0F, 0xCA, 0x03, // palignr MM1, MM2, 3
0x66, 0x0F, 0x3A, 0x0F, 0xCA, 0x03, // palignr XMM1, XMM2, 3
- 0x0F, 0x3A, 0x0F, 0x5D, 0xD8, 0x03, // palignr MM3, -0x28[EBP], 3
- 0x66, 0x0F, 0x3A, 0x0F, 0x5D, 0xE0, 0x03, // palignr XMM3, -0x20[EBP], 3
+ 0x0F, 0x3A, 0x0F, 0x5D, 0xE8, 0x03, // palignr MM3, -0x18[EBP], 3
+ 0x66, 0x0F, 0x3A, 0x0F, 0x5D, 0xF0, 0x03, // palignr XMM3, -0x10[EBP], 3
0x0F, 0x38, 0x02, 0xCA, // phaddd MM1, MM2
0x66, 0x0F, 0x38, 0x02, 0xCA, // phaddd XMM1, XMM2
- 0x0F, 0x38, 0x02, 0x5D, 0xD8, // phaddd MM3, -0x28[EBP]
- 0x66, 0x0F, 0x38, 0x02, 0x5D, 0xE0, // phaddd XMM3, -0x20[EBP]
+ 0x0F, 0x38, 0x02, 0x5D, 0xE8, // phaddd MM3, -0x18[EBP]
+ 0x66, 0x0F, 0x38, 0x02, 0x5D, 0xF0, // phaddd XMM3, -0x10[EBP]
0x0F, 0x38, 0x01, 0xCA, // phaddw MM1, MM2
0x66, 0x0F, 0x38, 0x01, 0xCA, // phaddw XMM1, XMM2
- 0x0F, 0x38, 0x01, 0x5D, 0xD8, // phaddw MM3, -0x28[EBP]
- 0x66, 0x0F, 0x38, 0x01, 0x5D, 0xE0, // phaddw XMM3, -0x20[EBP]
+ 0x0F, 0x38, 0x01, 0x5D, 0xE8, // phaddw MM3, -0x18[EBP]
+ 0x66, 0x0F, 0x38, 0x01, 0x5D, 0xF0, // phaddw XMM3, -0x10[EBP]
0x0F, 0x38, 0x03, 0xCA, // phaddsw MM1, MM2
0x66, 0x0F, 0x38, 0x03, 0xCA, // phaddsw XMM1, XMM2
- 0x0F, 0x38, 0x03, 0x5D, 0xD8, // phaddsw MM3, -0x28[EBP]
- 0x66, 0x0F, 0x38, 0x03, 0x5D, 0xE0, // phaddsw XMM3, -0x20[EBP]
+ 0x0F, 0x38, 0x03, 0x5D, 0xE8, // phaddsw MM3, -0x18[EBP]
+ 0x66, 0x0F, 0x38, 0x03, 0x5D, 0xF0, // phaddsw XMM3, -0x10[EBP]
0x0F, 0x38, 0x06, 0xCA, // phsubd MM1, MM2
0x66, 0x0F, 0x38, 0x06, 0xCA, // phsubd XMM1, XMM2
- 0x0F, 0x38, 0x06, 0x5D, 0xD8, // phsubd MM3, -0x28[EBP]
- 0x66, 0x0F, 0x38, 0x06, 0x5D, 0xE0, // phsubd XMM3, -0x20[EBP]
+ 0x0F, 0x38, 0x06, 0x5D, 0xE8, // phsubd MM3, -0x18[EBP]
+ 0x66, 0x0F, 0x38, 0x06, 0x5D, 0xF0, // phsubd XMM3, -0x10[EBP]
0x0F, 0x38, 0x05, 0xCA, // phsubw MM1, MM2
0x66, 0x0F, 0x38, 0x05, 0xCA, // phsubw XMM1, XMM2
- 0x0F, 0x38, 0x05, 0x5D, 0xD8, // phsubw MM3, -0x28[EBP]
- 0x66, 0x0F, 0x38, 0x05, 0x5D, 0xE0, // phsubw XMM3, -0x20[EBP]
+ 0x0F, 0x38, 0x05, 0x5D, 0xE8, // phsubw MM3, -0x18[EBP]
+ 0x66, 0x0F, 0x38, 0x05, 0x5D, 0xF0, // phsubw XMM3, -0x10[EBP]
0x0F, 0x38, 0x07, 0xCA, // phsubsw MM1, MM2
0x66, 0x0F, 0x38, 0x07, 0xCA, // phsubsw XMM1, XMM2
- 0x0F, 0x38, 0x07, 0x5D, 0xD8, // phsubsw MM3, -0x28[EBP]
- 0x66, 0x0F, 0x38, 0x07, 0x5D, 0xE0, // phsubsw XMM3, -0x20[EBP]
+ 0x0F, 0x38, 0x07, 0x5D, 0xE8, // phsubsw MM3, -0x18[EBP]
+ 0x66, 0x0F, 0x38, 0x07, 0x5D, 0xF0, // phsubsw XMM3, -0x10[EBP]
0x0F, 0x38, 0x04, 0xCA, // pmaddubsw MM1, MM2
0x66, 0x0F, 0x38, 0x04, 0xCA, // pmaddubsw XMM1, XMM2
- 0x0F, 0x38, 0x04, 0x5D, 0xD8, // pmaddubsw MM3, -0x28[EBP]
- 0x66, 0x0F, 0x38, 0x04, 0x5D, 0xE0, // pmaddubsw XMM3, -0x20[EBP]
+ 0x0F, 0x38, 0x04, 0x5D, 0xE8, // pmaddubsw MM3, -0x18[EBP]
+ 0x66, 0x0F, 0x38, 0x04, 0x5D, 0xF0, // pmaddubsw XMM3, -0x10[EBP]
0x0F, 0x38, 0x0B, 0xCA, // pmulhrsw MM1, MM2
0x66, 0x0F, 0x38, 0x0B, 0xCA, // pmulhrsw XMM1, XMM2
- 0x0F, 0x38, 0x0B, 0x5D, 0xD8, // pmulhrsw MM3, -0x28[EBP]
- 0x66, 0x0F, 0x38, 0x0B, 0x5D, 0xE0, // pmulhrsw XMM3, -0x20[EBP]
+ 0x0F, 0x38, 0x0B, 0x5D, 0xE8, // pmulhrsw MM3, -0x18[EBP]
+ 0x66, 0x0F, 0x38, 0x0B, 0x5D, 0xF0, // pmulhrsw XMM3, -0x10[EBP]
0x0F, 0x38, 0x00, 0xCA, // pshufb MM1, MM2
0x66, 0x0F, 0x38, 0x00, 0xCA, // pshufb XMM1, XMM2
- 0x0F, 0x38, 0x00, 0x5D, 0xD8, // pshufb MM3, -0x28[EBP]
- 0x66, 0x0F, 0x38, 0x00, 0x5D, 0xE0, // pshufb XMM3, -0x20[EBP]
+ 0x0F, 0x38, 0x00, 0x5D, 0xE8, // pshufb MM3, -0x18[EBP]
+ 0x66, 0x0F, 0x38, 0x00, 0x5D, 0xF0, // pshufb XMM3, -0x10[EBP]
0x0F, 0x38, 0x1C, 0xCA, // pabsb MM1, MM2
0x66, 0x0F, 0x38, 0x1C, 0xCA, // pabsb XMM1, XMM2
- 0x0F, 0x38, 0x1C, 0x5D, 0xD8, // pabsb MM3, -0x28[EBP]
- 0x66, 0x0F, 0x38, 0x1C, 0x5D, 0xE0, // pabsb XMM3, -0x20[EBP]
+ 0x0F, 0x38, 0x1C, 0x5D, 0xE8, // pabsb MM3, -0x18[EBP]
+ 0x66, 0x0F, 0x38, 0x1C, 0x5D, 0xF0, // pabsb XMM3, -0x10[EBP]
0x0F, 0x38, 0x1E, 0xCA, // pabsd MM1, MM2
0x66, 0x0F, 0x38, 0x1E, 0xCA, // pabsd XMM1, XMM2
- 0x0F, 0x38, 0x1E, 0x5D, 0xD8, // pabsd MM3, -0x28[EBP]
- 0x66, 0x0F, 0x38, 0x1E, 0x5D, 0xE0, // pabsd XMM3, -0x20[EBP]
+ 0x0F, 0x38, 0x1E, 0x5D, 0xE8, // pabsd MM3, -0x18[EBP]
+ 0x66, 0x0F, 0x38, 0x1E, 0x5D, 0xF0, // pabsd XMM3, -0x10[EBP]
0x0F, 0x38, 0x1D, 0xCA, // pabsw MM1, MM2
0x66, 0x0F, 0x38, 0x1D, 0xCA, // pabsw XMM1, XMM2
- 0x0F, 0x38, 0x1D, 0x5D, 0xD8, // pabsw MM3, -0x28[EBP]
- 0x66, 0x0F, 0x38, 0x1D, 0x5D, 0xE0, // pabsw XMM3, -0x20[EBP]
+ 0x0F, 0x38, 0x1D, 0x5D, 0xE8, // pabsw MM3, -0x18[EBP]
+ 0x66, 0x0F, 0x38, 0x1D, 0x5D, 0xF0, // pabsw XMM3, -0x10[EBP]
0x0F, 0x38, 0x08, 0xCA, // psignb MM1, MM2
0x66, 0x0F, 0x38, 0x08, 0xCA, // psignb XMM1, XMM2
- 0x0F, 0x38, 0x08, 0x5D, 0xD8, // psignb MM3, -0x28[EBP]
- 0x66, 0x0F, 0x38, 0x08, 0x5D, 0xE0, // psignb XMM3, -0x20[EBP]
+ 0x0F, 0x38, 0x08, 0x5D, 0xE8, // psignb MM3, -0x18[EBP]
+ 0x66, 0x0F, 0x38, 0x08, 0x5D, 0xF0, // psignb XMM3, -0x10[EBP]
0x0F, 0x38, 0x0A, 0xCA, // psignd MM1, MM2
0x66, 0x0F, 0x38, 0x0A, 0xCA, // psignd XMM1, XMM2
- 0x0F, 0x38, 0x0A, 0x5D, 0xD8, // psignd MM3, -0x28[EBP]
- 0x66, 0x0F, 0x38, 0x0A, 0x5D, 0xE0, // psignd XMM3, -0x20[EBP]
+ 0x0F, 0x38, 0x0A, 0x5D, 0xE8, // psignd MM3, -0x18[EBP]
+ 0x66, 0x0F, 0x38, 0x0A, 0x5D, 0xF0, // psignd XMM3, -0x10[EBP]
0x0F, 0x38, 0x09, 0xCA, // psignw MM1, MM2
0x66, 0x0F, 0x38, 0x09, 0xCA, // psignw XMM1, XMM2
- 0x0F, 0x38, 0x09, 0x5D, 0xD8, // psignw MM3, -0x28[EBP]
- 0x66, 0x0F, 0x38, 0x09, 0x5D, 0xE0, // psignw XMM3, -0x20[EBP]
+ 0x0F, 0x38, 0x09, 0x5D, 0xE8, // psignw MM3, -0x18[EBP]
+ 0x66, 0x0F, 0x38, 0x09, 0x5D, 0xF0, // psignw XMM3, -0x10[EBP]
];
asm
@@ -4265,11 +4226,7 @@ L1: pop EAX;
mov p[EBP],EAX;
}
- foreach (i,b; data)
- {
- //printf("data[%d] = 0x%02x, should be 0x%02x\n", i, p[i], b);
- assert(p[i] == b);
- }
+ compareBytes(p, data);
}
/****************************************************/
@@ -4287,113 +4244,113 @@ void test58()
static ubyte data[] =
[
0x66, 0x0F, 0x3A, 0x0D, 0xCA, 3,// blendpd XMM1,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x0D, 0x5D, 0xE0, 3,// blendpd XMM3,XMMWORD PTR [RBP-0x20],0x3
+ 0x66, 0x0F, 0x3A, 0x0D, 0x5D, 0xF0, 3,// blendpd XMM3,XMMWORD PTR [RBP-0x10],0x3
0x66, 0x0F, 0x3A, 0x0C, 0xCA, 3,// blendps XMM1,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x0C, 0x5D, 0xE0, 3,// blendps XMM3,XMMWORD PTR [RBP-0x20],0x3
+ 0x66, 0x0F, 0x3A, 0x0C, 0x5D, 0xF0, 3,// blendps XMM3,XMMWORD PTR [RBP-0x10],0x3
0x66, 0x0F, 0x38, 0x15, 0xCA, // blendvpd XMM1,XMM2,XMM0
- 0x66, 0x0F, 0x38, 0x15, 0x5D, 0xE0, // blendvpd XMM3,XMMWORD PTR [RBP-0x20],XMM0
+ 0x66, 0x0F, 0x38, 0x15, 0x5D, 0xF0, // blendvpd XMM3,XMMWORD PTR [RBP-0x10],XMM0
0x66, 0x0F, 0x38, 0x14, 0xCA, // blendvps XMM1,XMM2,XMM0
- 0x66, 0x0F, 0x38, 0x14, 0x5D, 0xE0, // blendvps XMM3,XMMWORD PTR [RBP-0x20],XMM0
+ 0x66, 0x0F, 0x38, 0x14, 0x5D, 0xF0, // blendvps XMM3,XMMWORD PTR [RBP-0x10],XMM0
0x66, 0x0F, 0x3A, 0x41, 0xCA, 3,// dppd XMM1,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x41, 0x5D, 0xE0, 3,// dppd XMM3,XMMWORD PTR [RBP-0x20],0x3
+ 0x66, 0x0F, 0x3A, 0x41, 0x5D, 0xF0, 3,// dppd XMM3,XMMWORD PTR [RBP-0x10],0x3
0x66, 0x0F, 0x3A, 0x40, 0xCA, 3,// dpps XMM1,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x40, 0x5D, 0xE0, 3,// dpps XMM3,XMMWORD PTR [RBP-0x20],0x3
+ 0x66, 0x0F, 0x3A, 0x40, 0x5D, 0xF0, 3,// dpps XMM3,XMMWORD PTR [RBP-0x10],0x3
0x66, 0x0F, 0x3A, 0x17, 0xD2, 3,// extractps EDX,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x17, 0x55, 0xC8, 3,// extractps DWORD PTR [RBP-0x38],XMM2,0x3
+ 0x66, 0x0F, 0x3A, 0x17, 0x55, 0xD8, 3,// extractps DWORD PTR [RBP-0x28],XMM2,0x3
0x66, 0x0F, 0x3A, 0x21, 0xCA, 3,// insertps XMM1,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x21, 0x5D, 0xC8, 3,// insertps XMM3,DWORD PTR [RBP-0x38],0x3
- 0x66, 0x0F, 0x38, 0x2A, 0x4D, 0xE0, // movntdqa XMM1,XMMWORD PTR [RBP-0x20]
+ 0x66, 0x0F, 0x3A, 0x21, 0x5D, 0xD8, 3,// insertps XMM3,DWORD PTR [RBP-0x28],0x3
+ 0x66, 0x0F, 0x38, 0x2A, 0x4D, 0xF0, // movntdqa XMM1,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x3A, 0x42, 0xCA, 3,// mpsadbw XMM1,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x42, 0x5D, 0xE0, 3,// mpsadbw XMM3,XMMWORD PTR [RBP-0x20],0x3
+ 0x66, 0x0F, 0x3A, 0x42, 0x5D, 0xF0, 3,// mpsadbw XMM3,XMMWORD PTR [RBP-0x10],0x3
0x66, 0x0F, 0x38, 0x2B, 0xCA, // packusdw XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x2B, 0x5D, 0xE0, // packusdw XMM3,XMMWORD PTR [RBP-0x20]
+ 0x66, 0x0F, 0x38, 0x2B, 0x5D, 0xF0, // packusdw XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x38, 0x10, 0xCA, // pblendvb XMM1,XMM2,XMM0
- 0x66, 0x0F, 0x38, 0x10, 0x5D, 0xE0, // pblendvb XMM3,XMMWORD PTR [RBP-0x20],XMM0
+ 0x66, 0x0F, 0x38, 0x10, 0x5D, 0xF0, // pblendvb XMM3,XMMWORD PTR [RBP-0x10],XMM0
0x66, 0x0F, 0x3A, 0x0E, 0xCA, 3,// pblendw XMM1,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x0E, 0x5D, 0xE0, 3,// pblendw XMM3,XMMWORD PTR [RBP-0x20],0x3
+ 0x66, 0x0F, 0x3A, 0x0E, 0x5D, 0xF0, 3,// pblendw XMM3,XMMWORD PTR [RBP-0x10],0x3
0x66, 0x0F, 0x38, 0x29, 0xCA, // pcmpeqq XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x29, 0x5D, 0xE0, // pcmpeqq XMM3,XMMWORD PTR [RBP-0x20]
+ 0x66, 0x0F, 0x38, 0x29, 0x5D, 0xF0, // pcmpeqq XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x3A, 0x14, 0xD0, 3,// pextrb EAX,XMM2,0x3
0x66, 0x0F, 0x3A, 0x14, 0xD3, 3,// pextrb EBX,XMM2,0x3
0x66, 0x0F, 0x3A, 0x14, 0xD1, 3,// pextrb ECX,XMM2,0x3
0x66, 0x0F, 0x3A, 0x14, 0xD2, 3,// pextrb EDX,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x14, 0x5D, 0xC4, 3,// pextrb BYTE PTR [RBP-0x3C],XMM3,0x3
+ 0x66, 0x0F, 0x3A, 0x14, 0x5D, 0xD4, 3,// pextrb BYTE PTR [RBP-0x2C],XMM3,0x3
0x66, 0x0F, 0x3A, 0x16, 0xD0, 3,// pextrd EAX,XMM2,0x3
0x66, 0x0F, 0x3A, 0x16, 0xD3, 3,// pextrd EBX,XMM2,0x3
0x66, 0x0F, 0x3A, 0x16, 0xD1, 3,// pextrd ECX,XMM2,0x3
0x66, 0x0F, 0x3A, 0x16, 0xD2, 3,// pextrd EDX,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x16, 0x5D, 0xC8, 3,// pextrd DWORD PTR [RBP-0x38],XMM3,0x3
+ 0x66, 0x0F, 0x3A, 0x16, 0x5D, 0xD8, 3,// pextrd DWORD PTR [RBP-0x28],XMM3,0x3
0x66, 0x0F, 0xC5, 0xC2, 3,// pextrw EAX,XMM2,0x3
0x66, 0x0F, 0xC5, 0xDA, 3,// pextrw EBX,XMM2,0x3
0x66, 0x0F, 0xC5, 0xCA, 3,// pextrw ECX,XMM2,0x3
0x66, 0x0F, 0xC5, 0xD2, 3,// pextrw EDX,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x15, 0x5D, 0xC6, 3,// pextrw WORD PTR [RBP-0x3A],XMM3,0x3
+ 0x66, 0x0F, 0x3A, 0x15, 0x5D, 0xD6, 3,// pextrw WORD PTR [RBP-0x2A],XMM3,0x3
0x66, 0x0F, 0x38, 0x41, 0xCA, // phminposuw XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x41, 0x5D, 0xE0, // phminposuw XMM3,XMMWORD PTR [RBP-0x20]
+ 0x66, 0x0F, 0x38, 0x41, 0x5D, 0xF0, // phminposuw XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x3A, 0x20, 0xC8, 3,// pinsrb XMM1,EAX,0x3
0x66, 0x0F, 0x3A, 0x20, 0xCB, 3,// pinsrb XMM1,EBX,0x3
0x66, 0x0F, 0x3A, 0x20, 0xC9, 3,// pinsrb XMM1,ECX,0x3
0x66, 0x0F, 0x3A, 0x20, 0xCA, 3,// pinsrb XMM1,EDX,0x3
- 0x66, 0x0F, 0x3A, 0x20, 0x5D, 0xC4, 3,// pinsrb XMM3,BYTE PTR [RBP-0x3C],0x3
+ 0x66, 0x0F, 0x3A, 0x20, 0x5D, 0xD4, 3,// pinsrb XMM3,BYTE PTR [RBP-0x2C],0x3
0x66, 0x0F, 0x3A, 0x22, 0xC8, 3,// pinsrd XMM1,EAX,0x3
0x66, 0x0F, 0x3A, 0x22, 0xCB, 3,// pinsrd XMM1,EBX,0x3
0x66, 0x0F, 0x3A, 0x22, 0xC9, 3,// pinsrd XMM1,ECX,0x3
0x66, 0x0F, 0x3A, 0x22, 0xCA, 3,// pinsrd XMM1,EDX,0x3
- 0x66, 0x0F, 0x3A, 0x22, 0x5D, 0xC8, 3,// pinsrd XMM3,DWORD PTR [RBP-0x38],0x3
+ 0x66, 0x0F, 0x3A, 0x22, 0x5D, 0xD8, 3,// pinsrd XMM3,DWORD PTR [RBP-0x28],0x3
0x66, 0x0F, 0x38, 0x3C, 0xCA, // pmaxsb XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x3C, 0x5D, 0xE0, // pmaxsb XMM3,XMMWORD PTR [RBP-0x20]
+ 0x66, 0x0F, 0x38, 0x3C, 0x5D, 0xF0, // pmaxsb XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x38, 0x3D, 0xCA, // pmaxsd XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x3D, 0x5D, 0xE0, // pmaxsd XMM3,XMMWORD PTR [RBP-0x20]
+ 0x66, 0x0F, 0x38, 0x3D, 0x5D, 0xF0, // pmaxsd XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x38, 0x3F, 0xCA, // pmaxud XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x3F, 0x5D, 0xE0, // pmaxud XMM3,XMMWORD PTR [RBP-0x20]
+ 0x66, 0x0F, 0x38, 0x3F, 0x5D, 0xF0, // pmaxud XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x38, 0x3E, 0xCA, // pmaxuw XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x3E, 0x5D, 0xE0, // pmaxuw XMM3,XMMWORD PTR [RBP-0x20]
+ 0x66, 0x0F, 0x38, 0x3E, 0x5D, 0xF0, // pmaxuw XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x38, 0x38, 0xCA, // pminsb XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x38, 0x5D, 0xE0, // pminsb XMM3,XMMWORD PTR [RBP-0x20]
+ 0x66, 0x0F, 0x38, 0x38, 0x5D, 0xF0, // pminsb XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x38, 0x39, 0xCA, // pminsd XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x39, 0x5D, 0xE0, // pminsd XMM3,XMMWORD PTR [RBP-0x20]
+ 0x66, 0x0F, 0x38, 0x39, 0x5D, 0xF0, // pminsd XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x38, 0x3B, 0xCA, // pminud XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x3B, 0x5D, 0xE0, // pminud XMM3,XMMWORD PTR [RBP-0x20]
+ 0x66, 0x0F, 0x38, 0x3B, 0x5D, 0xF0, // pminud XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x38, 0x3A, 0xCA, // pminuw XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x3A, 0x5D, 0xE0, // pminuw XMM3,XMMWORD PTR [RBP-0x20]
+ 0x66, 0x0F, 0x38, 0x3A, 0x5D, 0xF0, // pminuw XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x38, 0x20, 0xCA, // pmovsxbw XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x20, 0x5D, 0xD0, // pmovsxbw XMM3,QWORD PTR [RBP-0x30]
+ 0x66, 0x0F, 0x38, 0x20, 0x5D, 0xE0, // pmovsxbw XMM3,QWORD PTR [RBP-0x20]
0x66, 0x0F, 0x38, 0x21, 0xCA, // pmovsxbd XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x21, 0x5D, 0xC8, // pmovsxbd XMM3,DWORD PTR [RBP-0x38]
+ 0x66, 0x0F, 0x38, 0x21, 0x5D, 0xD8, // pmovsxbd XMM3,DWORD PTR [RBP-0x28]
0x66, 0x0F, 0x38, 0x22, 0xCA, // pmovsxbq XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x22, 0x5D, 0xC6, // pmovsxbq XMM3,WORD PTR [RBP-0x3A]
+ 0x66, 0x0F, 0x38, 0x22, 0x5D, 0xD6, // pmovsxbq XMM3,WORD PTR [RBP-0x2A]
0x66, 0x0F, 0x38, 0x23, 0xCA, // pmovsxwd XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x23, 0x5D, 0xD0, // pmovsxwd XMM3,QWORD PTR [RBP-0x30]
+ 0x66, 0x0F, 0x38, 0x23, 0x5D, 0xE0, // pmovsxwd XMM3,QWORD PTR [RBP-0x20]
0x66, 0x0F, 0x38, 0x24, 0xCA, // pmovsxwq XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x24, 0x5D, 0xC8, // pmovsxwq XMM3,DWORD PTR [RBP-0x38]
+ 0x66, 0x0F, 0x38, 0x24, 0x5D, 0xD8, // pmovsxwq XMM3,DWORD PTR [RBP-0x28]
0x66, 0x0F, 0x38, 0x25, 0xCA, // pmovsxdq XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x25, 0x5D, 0xD0, // pmovsxdq XMM3,QWORD PTR [RBP-0x30]
+ 0x66, 0x0F, 0x38, 0x25, 0x5D, 0xE0, // pmovsxdq XMM3,QWORD PTR [RBP-0x20]
0x66, 0x0F, 0x38, 0x30, 0xCA, // pmovzxbw XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x30, 0x5D, 0xD0, // pmovzxbw XMM3,QWORD PTR [RBP-0x30]
+ 0x66, 0x0F, 0x38, 0x30, 0x5D, 0xE0, // pmovzxbw XMM3,QWORD PTR [RBP-0x20]
0x66, 0x0F, 0x38, 0x31, 0xCA, // pmovzxbd XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x31, 0x5D, 0xC8, // pmovzxbd XMM3,DWORD PTR [RBP-0x38]
+ 0x66, 0x0F, 0x38, 0x31, 0x5D, 0xD8, // pmovzxbd XMM3,DWORD PTR [RBP-0x28]
0x66, 0x0F, 0x38, 0x32, 0xCA, // pmovzxbq XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x32, 0x5D, 0xC6, // pmovzxbq XMM3,WORD PTR [RBP-0x3A]
+ 0x66, 0x0F, 0x38, 0x32, 0x5D, 0xD6, // pmovzxbq XMM3,WORD PTR [RBP-0x2A]
0x66, 0x0F, 0x38, 0x33, 0xCA, // pmovzxwd XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x33, 0x5D, 0xD0, // pmovzxwd XMM3,QWORD PTR [RBP-0x30]
+ 0x66, 0x0F, 0x38, 0x33, 0x5D, 0xE0, // pmovzxwd XMM3,QWORD PTR [RBP-0x20]
0x66, 0x0F, 0x38, 0x34, 0xCA, // pmovzxwq XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x34, 0x5D, 0xC8, // pmovzxwq XMM3,DWORD PTR [RBP-0x38]
+ 0x66, 0x0F, 0x38, 0x34, 0x5D, 0xD8, // pmovzxwq XMM3,DWORD PTR [RBP-0x28]
0x66, 0x0F, 0x38, 0x35, 0xCA, // pmovzxdq XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x35, 0x5D, 0xD0, // pmovzxdq XMM3,QWORD PTR [RBP-0x30]
+ 0x66, 0x0F, 0x38, 0x35, 0x5D, 0xE0, // pmovzxdq XMM3,QWORD PTR [RBP-0x20]
0x66, 0x0F, 0x38, 0x28, 0xCA, // pmuldq XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x28, 0x5D, 0xE0, // pmuldq XMM3,XMMWORD PTR [RBP-0x20]
+ 0x66, 0x0F, 0x38, 0x28, 0x5D, 0xF0, // pmuldq XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x38, 0x40, 0xCA, // pmulld XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x40, 0x5D, 0xE0, // pmulld XMM3,XMMWORD PTR [RBP-0x20]
+ 0x66, 0x0F, 0x38, 0x40, 0x5D, 0xF0, // pmulld XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x38, 0x17, 0xCA, // ptest XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x17, 0x5D, 0xE0, // ptest XMM3,XMMWORD PTR [RBP-0x20]
+ 0x66, 0x0F, 0x38, 0x17, 0x5D, 0xF0, // ptest XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x3A, 0x09, 0xCA, 3,// roundpd XMM1,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x09, 0x5D, 0xE0, 3,// roundpd XMM3,XMMWORD PTR [RBP-0x20],0x3
+ 0x66, 0x0F, 0x3A, 0x09, 0x5D, 0xF0, 3,// roundpd XMM3,XMMWORD PTR [RBP-0x10],0x3
0x66, 0x0F, 0x3A, 0x08, 0xCA, 3,// roundps XMM1,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x08, 0x5D, 0xE0, 3,// roundps XMM3,XMMWORD PTR [RBP-0x20],0x3
+ 0x66, 0x0F, 0x3A, 0x08, 0x5D, 0xF0, 3,// roundps XMM3,XMMWORD PTR [RBP-0x10],0x3
0x66, 0x0F, 0x3A, 0x0B, 0xCA, 3,// roundsd XMM1,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x0B, 0x5D, 0xD0, 3,// roundsd XMM3,QWORD PTR [RBP-0x30],0x3
+ 0x66, 0x0F, 0x3A, 0x0B, 0x5D, 0xE0, 3,// roundsd XMM3,QWORD PTR [RBP-0x20],0x3
0x66, 0x0F, 0x3A, 0x0A, 0xCA, 3,// roundss XMM1,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x0A, 0x4D, 0xC8, 3,// roundss xmm1,dword ptr [rbp-0x38],0x3
+ 0x66, 0x0F, 0x3A, 0x0A, 0x4D, 0xD8, 3,// roundss xmm1,dword ptr [rbp-0x28],0x3
];
asm
@@ -4559,11 +4516,7 @@ L1: pop EAX;
mov p[EBP],EAX;
}
- foreach (i,b; data)
- {
- //printf("data[%d] = 0x%02x, should be 0x%02x\n", i, p[i], b);
- assert(p[i] == b);
- }
+ compareBytes(p, data);
}
/****************************************************/
@@ -4583,23 +4536,23 @@ void test59()
0xF2, 0x0F, 0x38, 0xF0, 0xC1, // crc32 EAX, CL
0x66, 0xF2, 0x0F, 0x38, 0xF1, 0xC1, // crc32 EAX, CX
0xF2, 0x0F, 0x38, 0xF1, 0xC1, // crc32 EAX, ECX
-0xF2, 0x0F, 0x38, 0xF0, 0x55, 0xC4, // crc32 EDX, byte ptr [RBP-0x3C]
-0x66, 0xF2, 0x0F, 0x38, 0xF1, 0x55, 0xC6, // crc32 EDX, word ptr [RBP-0x3A]
-0xF2, 0x0F, 0x38, 0xF1, 0x55, 0xC8, // crc32 EDX,dword ptr [RBP-0x38]
+0xF2, 0x0F, 0x38, 0xF0, 0x55, 0xD4, // crc32 EDX, byte ptr [RBP-0x2C]
+0x66, 0xF2, 0x0F, 0x38, 0xF1, 0x55, 0xD6, // crc32 EDX, word ptr [RBP-0x2A]
+0xF2, 0x0F, 0x38, 0xF1, 0x55, 0xD8, // crc32 EDX,dword ptr [RBP-0x28]
0x66, 0x0F, 0x3A, 0x61, 0xCA, 2, // pcmpestri XMM1,XMM2, 2
-0x66, 0x0F, 0x3A, 0x61, 0x5D, 0xE0, 2, // pcmpestri XMM3,xmmword ptr [RBP-0x20], 2
+0x66, 0x0F, 0x3A, 0x61, 0x5D, 0xF0, 2, // pcmpestri XMM3,xmmword ptr [RBP-0x10], 2
0x66, 0x0F, 0x3A, 0x60, 0xCA, 2, // pcmpestrm XMM1,XMM2, 2
-0x66, 0x0F, 0x3A, 0x60, 0x5D, 0xE0, 2, // pcmpestrm XMM3,xmmword ptr [RBP-0x20], 2
+0x66, 0x0F, 0x3A, 0x60, 0x5D, 0xF0, 2, // pcmpestrm XMM3,xmmword ptr [RBP-0x10], 2
0x66, 0x0F, 0x3A, 0x63, 0xCA, 2, // pcmpistri XMM1,XMM2, 2
-0x66, 0x0F, 0x3A, 0x63, 0x5D, 0xE0, 2, // pcmpistri XMM3,xmmword ptr [RBP-0x20], 2
+0x66, 0x0F, 0x3A, 0x63, 0x5D, 0xF0, 2, // pcmpistri XMM3,xmmword ptr [RBP-0x10], 2
0x66, 0x0F, 0x3A, 0x62, 0xCA, 2, // pcmpistrm XMM1,XMM2, 2
-0x66, 0x0F, 0x3A, 0x62, 0x5D, 0xE0, 2, // pcmpistrm XMM3,xmmword ptr [RBP-0x20], 2
+0x66, 0x0F, 0x3A, 0x62, 0x5D, 0xF0, 2, // pcmpistrm XMM3,xmmword ptr [RBP-0x10], 2
0x66, 0x0F, 0x38, 0x37, 0xCA, // pcmpgtq XMM1,XMM2
-0x66, 0x0F, 0x38, 0x37, 0x5D, 0xE0, // pcmpgtq XMM3,xmmword ptr [RBP-0x20]
+0x66, 0x0F, 0x38, 0x37, 0x5D, 0xF0, // pcmpgtq XMM3,xmmword ptr [RBP-0x10]
0x66, 0xF3, 0x0F, 0xB8, 0xC1, // popcnt AX, CX
0xF3, 0x0F, 0xB8, 0xC1, // popcnt EAX, ECX
-0x66, 0xF3, 0x0F, 0xB8, 0x55, 0xC6, // popcnt DX, word ptr [RBP-0x3A]
-0xF3, 0x0F, 0xB8, 0x55, 0xC8, // popcnt EDX,dword ptr [RBP-0x38]
+0x66, 0xF3, 0x0F, 0xB8, 0x55, 0xD6, // popcnt DX, word ptr [RBP-0x2A]
+0xF3, 0x0F, 0xB8, 0x55, 0xD8, // popcnt EDX,dword ptr [RBP-0x28]
];
asm
@@ -4637,11 +4590,7 @@ L1: pop EAX;
mov p[EBP],EAX;
}
- foreach (i,b; data)
- {
- //printf("data[%d] = 0x%02x, should be 0x%02x\n", i, p[i], b);
- assert(p[i] == b);
- }
+ compareBytes(p, data);
}
/****************************************************/
View
283 test/runnable/iasm64.d
@@ -3003,6 +3003,27 @@ void test44()
/****************************************************/
+void compareBytes(ubyte *p, ubyte[] data, size_t line = __LINE__)
+{
+ if (p[0 .. data.length] != data)
+ {
+ import core.stdc.stdio;
+
+ size_t pos;
+ while (pos < data.length)
+ {
+ if (p[pos] != data[pos])
+ break;
+ ++pos;
+ }
+ printf("iasm64.d(%d): asm mismatch\n", line);
+ printf("data[%d] = 0x%02x, should be 0x%02x\n", pos, p[pos], data[pos]);
+ assert(0);
+ }
+}
+
+/****************************************************/
+
void test45()
{
ubyte *p;
@@ -3038,10 +3059,8 @@ L1: ;
pop RBX ;
mov p[RBP],RBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
/****************************************************/
@@ -3077,10 +3096,8 @@ L1: ;
pop RBX ;
mov p[RBP],RBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
/****************************************************/
@@ -3554,10 +3571,8 @@ L1: ;
pop RBX ;
mov p[RBP],RBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
@@ -3809,10 +3824,8 @@ L1: ;
pop RBX ;
mov p[RBP],RBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
@@ -3847,7 +3860,7 @@ void test52()
//0x66, 0xF7, 0x1D, 0x00, 0x00, 0x00, 0x00, // neg word ptr _D6iasm641ws@PC32[RIP]
// 0xF7, 0x1D, 0x00, 0x00, 0x00, 0x00, // neg dword ptr _D6iasm641ii@PC32[RIP]
// 0x48, 0xF7, 0x1D, 0x00, 0x00, 0x00, 0x00, // neg qword ptr _D6iasm641ll@PC32[RIP]
- 0xF7, 0x5D, 0xD0, // neg dword ptr -8[RBP]
+ 0xF7, 0x5D, 0xF0, // neg dword ptr -16[RBP]
0xF6, 0x1B, // neg byte ptr [RBX]
0xF6, 0x1B, // neg byte ptr [RBX]
0x49, 0xF7, 0xD8, // neg R8
@@ -3879,11 +3892,7 @@ L1: pop RAX ;
mov p[RBP],RAX ;
}
- foreach (i,b; data)
- {
- //printf("data[%d] = 0x%02x, should be 0x%02x\n", i, p[i], b);
- assert(p[i] == b);
- }
+ compareBytes(p, data);
}
/****************************************************/
@@ -4008,11 +4017,7 @@ L1: pop RAX ;
mov p[RBP],RAX ;
}
- foreach (i,b; data)
- {
- //printf("data[%d] = 0x%02x, should be 0x%02x\n", i, p[i], b);
- assert(p[i] == b);
- }
+ compareBytes(p, data);
}
/****************************************************/
@@ -4087,11 +4092,7 @@ L1: pop RAX;
mov p[RBP],RAX;
}
- foreach (i,b; data)
- {
- //printf("data[%d] = 0x%02x, should be 0x%02x\n", i, p[i], b);
- assert(p[i] == b);
- }
+ compareBytes(p, data);
}
/****************************************************/
@@ -4137,11 +4138,7 @@ L1: pop RAX;
mov p[RBP],RAX;
}
- foreach (i,b; data)
- {
- //printf("data[%d] = 0x%02x, should be 0x%02x\n", i, p[i], b);
- assert(p[i] == b);
- }
+ compareBytes(p, data);
}
/****************************************************/
@@ -4185,68 +4182,68 @@ void test57()
[
0x0F, 0x3A, 0x0F, 0xCA, 0x03, // palignr MM1, MM2, 3
0x66, 0x0F, 0x3A, 0x0F, 0xCA, 0x03, // palignr XMM1, XMM2, 3
- 0x0F, 0x3A, 0x0F, 0x5D, 0xC8, 0x03, // palignr MM3, -0x38[RBP], 3
- 0x66, 0x0F, 0x3A, 0x0F, 0x5D, 0xD0, 0x03, // palignr XMM3, -0x30[RBP], 3
+ 0x0F, 0x3A, 0x0F, 0x5D, 0xE8, 0x03, // palignr MM3, -0x18[RBP], 3
+ 0x66, 0x0F, 0x3A, 0x0F, 0x5D, 0xF0, 0x03, // palignr XMM3, -0x10[RBP], 3
0x0F, 0x38, 0x02, 0xCA, // phaddd MM1, MM2
0x66, 0x0F, 0x38, 0x02, 0xCA, // phaddd XMM1, XMM2
- 0x0F, 0x38, 0x02, 0x5D, 0xC8, // phaddd MM3, -0x38[RBP]
- 0x66, 0x0F, 0x38, 0x02, 0x5D, 0xD0, // phaddd XMM3, -0x30[RBP]
+ 0x0F, 0x38, 0x02, 0x5D, 0xE8, // phaddd MM3, -0x18[RBP]
+ 0x66, 0x0F, 0x38, 0x02, 0x5D, 0xF0, // phaddd XMM3, -0x10[RBP]
0x0F, 0x38, 0x01, 0xCA, // phaddw MM1, MM2
0x66, 0x0F, 0x38, 0x01, 0xCA, // phaddw XMM1, XMM2
- 0x0F, 0x38, 0x01, 0x5D, 0xC8, // phaddw MM3, -0x38[RBP]
- 0x66, 0x0F, 0x38, 0x01, 0x5D, 0xD0, // phaddw XMM3, -0x30[RBP]
+ 0x0F, 0x38, 0x01, 0x5D, 0xE8, // phaddw MM3, -0x18[RBP]
+ 0x66, 0x0F, 0x38, 0x01, 0x5D, 0xF0, // phaddw XMM3, -0x10[RBP]
0x0F, 0x38, 0x03, 0xCA, // phaddsw MM1, MM2
0x66, 0x0F, 0x38, 0x03, 0xCA, // phaddsw XMM1, XMM2
- 0x0F, 0x38, 0x03, 0x5D, 0xC8, // phaddsw MM3, -0x38[RBP]
- 0x66, 0x0F, 0x38, 0x03, 0x5D, 0xD0, // phaddsw XMM3, -0x30[RBP]
+ 0x0F, 0x38, 0x03, 0x5D, 0xE8, // phaddsw MM3, -0x18[RBP]
+ 0x66, 0x0F, 0x38, 0x03, 0x5D, 0xF0, // phaddsw XMM3, -0x10[RBP]
0x0F, 0x38, 0x06, 0xCA, // phsubd MM1, MM2
0x66, 0x0F, 0x38, 0x06, 0xCA, // phsubd XMM1, XMM2
- 0x0F, 0x38, 0x06, 0x5D, 0xC8, // phsubd MM3, -0x38[RBP]
- 0x66, 0x0F, 0x38, 0x06, 0x5D, 0xD0, // phsubd XMM3, -0x30[RBP]
+ 0x0F, 0x38, 0x06, 0x5D, 0xE8, // phsubd MM3, -0x18[RBP]
+ 0x66, 0x0F, 0x38, 0x06, 0x5D, 0xF0, // phsubd XMM3, -0x10[RBP]
0x0F, 0x38, 0x05, 0xCA, // phsubw MM1, MM2
0x66, 0x0F, 0x38, 0x05, 0xCA, // phsubw XMM1, XMM2
- 0x0F, 0x38, 0x05, 0x5D, 0xC8, // phsubw MM3, -0x38[RBP]
- 0x66, 0x0F, 0x38, 0x05, 0x5D, 0xD0, // phsubw XMM3, -0x30[RBP]
+ 0x0F, 0x38, 0x05, 0x5D, 0xE8, // phsubw MM3, -0x18[RBP]
+ 0x66, 0x0F, 0x38, 0x05, 0x5D, 0xF0, // phsubw XMM3, -0x10[RBP]
0x0F, 0x38, 0x07, 0xCA, // phsubsw MM1, MM2
0x66, 0x0F, 0x38, 0x07, 0xCA, // phsubsw XMM1, XMM2
- 0x0F, 0x38, 0x07, 0x5D, 0xC8, // phsubsw MM3, -0x38[RBP]
- 0x66, 0x0F, 0x38, 0x07, 0x5D, 0xD0, // phsubsw XMM3, -0x30[RBP]
+ 0x0F, 0x38, 0x07, 0x5D, 0xE8, // phsubsw MM3, -0x18[RBP]
+ 0x66, 0x0F, 0x38, 0x07, 0x5D, 0xF0, // phsubsw XMM3, -0x10[RBP]
0x0F, 0x38, 0x04, 0xCA, // pmaddubsw MM1, MM2
0x66, 0x0F, 0x38, 0x04, 0xCA, // pmaddubsw XMM1, XMM2
- 0x0F, 0x38, 0x04, 0x5D, 0xC8, // pmaddubsw MM3, -0x38[RBP]
- 0x66, 0x0F, 0x38, 0x04, 0x5D, 0xD0, // pmaddubsw XMM3, -0x30[RBP]
+ 0x0F, 0x38, 0x04, 0x5D, 0xE8, // pmaddubsw MM3, -0x18[RBP]
+ 0x66, 0x0F, 0x38, 0x04, 0x5D, 0xF0, // pmaddubsw XMM3, -0x10[RBP]
0x0F, 0x38, 0x0B, 0xCA, // pmulhrsw MM1, MM2
0x66, 0x0F, 0x38, 0x0B, 0xCA, // pmulhrsw XMM1, XMM2
- 0x0F, 0x38, 0x0B, 0x5D, 0xC8, // pmulhrsw MM3, -0x38[RBP]
- 0x66, 0x0F, 0x38, 0x0B, 0x5D, 0xD0, // pmulhrsw XMM3, -0x30[RBP]
+ 0x0F, 0x38, 0x0B, 0x5D, 0xE8, // pmulhrsw MM3, -0x18[RBP]
+ 0x66, 0x0F, 0x38, 0x0B, 0x5D, 0xF0, // pmulhrsw XMM3, -0x10[RBP]
0x0F, 0x38, 0x00, 0xCA, // pshufb MM1, MM2
0x66, 0x0F, 0x38, 0x00, 0xCA, // pshufb XMM1, XMM2
- 0x0F, 0x38, 0x00, 0x5D, 0xC8, // pshufb MM3, -0x38[RBP]
- 0x66, 0x0F, 0x38, 0x00, 0x5D, 0xD0, // pshufb XMM3, -0x30[RBP]
+ 0x0F, 0x38, 0x00, 0x5D, 0xE8, // pshufb MM3, -0x18[RBP]
+ 0x66, 0x0F, 0x38, 0x00, 0x5D, 0xF0, // pshufb XMM3, -0x10[RBP]
0x0F, 0x38, 0x1C, 0xCA, // pabsb MM1, MM2
0x66, 0x0F, 0x38, 0x1C, 0xCA, // pabsb XMM1, XMM2
- 0x0F, 0x38, 0x1C, 0x5D, 0xC8, // pabsb MM3, -0x38[RBP]
- 0x66, 0x0F, 0x38, 0x1C, 0x5D, 0xD0, // pabsb XMM3, -0x30[RBP]
+ 0x0F, 0x38, 0x1C, 0x5D, 0xE8, // pabsb MM3, -0x18[RBP]
+ 0x66, 0x0F, 0x38, 0x1C, 0x5D, 0xF0, // pabsb XMM3, -0x10[RBP]
0x0F, 0x38, 0x1E, 0xCA, // pabsd MM1, MM2
0x66, 0x0F, 0x38, 0x1E, 0xCA, // pabsd XMM1, XMM2
- 0x0F, 0x38, 0x1E, 0x5D, 0xC8, // pabsd MM3, -0x38[RBP]
- 0x66, 0x0F, 0x38, 0x1E, 0x5D, 0xD0, // pabsd XMM3, -0x30[RBP]
+ 0x0F, 0x38, 0x1E, 0x5D, 0xE8, // pabsd MM3, -0x18[RBP]
+ 0x66, 0x0F, 0x38, 0x1E, 0x5D, 0xF0, // pabsd XMM3, -0x10[RBP]
0x0F, 0x38, 0x1D, 0xCA, // pabsw MM1, MM2
0x66, 0x0F, 0x38, 0x1D, 0xCA, // pabsw XMM1, XMM2
- 0x0F, 0x38, 0x1D, 0x5D, 0xC8, // pabsw MM3, -0x38[RBP]
- 0x66, 0x0F, 0x38, 0x1D, 0x5D, 0xD0, // pabsw XMM3, -0x30[RBP]
+ 0x0F, 0x38, 0x1D, 0x5D, 0xE8, // pabsw MM3, -0x18[RBP]
+ 0x66, 0x0F, 0x38, 0x1D, 0x5D, 0xF0, // pabsw XMM3, -0x10[RBP]
0x0F, 0x38, 0x08, 0xCA, // psignb MM1, MM2
0x66, 0x0F, 0x38, 0x08, 0xCA, // psignb XMM1, XMM2
- 0x0F, 0x38, 0x08, 0x5D, 0xC8, // psignb MM3, -0x38[RBP]
- 0x66, 0x0F, 0x38, 0x08, 0x5D, 0xD0, // psignb XMM3, -0x30[RBP]
+ 0x0F, 0x38, 0x08, 0x5D, 0xE8, // psignb MM3, -0x18[RBP]
+ 0x66, 0x0F, 0x38, 0x08, 0x5D, 0xF0, // psignb XMM3, -0x10[RBP]
0x0F, 0x38, 0x0A, 0xCA, // psignd MM1, MM2
0x66, 0x0F, 0x38, 0x0A, 0xCA, // psignd XMM1, XMM2
- 0x0F, 0x38, 0x0A, 0x5D, 0xC8, // psignd MM3, -0x38[RBP]
- 0x66, 0x0F, 0x38, 0x0A, 0x5D, 0xD0, // psignd XMM3, -0x30[RBP]
+ 0x0F, 0x38, 0x0A, 0x5D, 0xE8, // psignd MM3, -0x18[RBP]
+ 0x66, 0x0F, 0x38, 0x0A, 0x5D, 0xF0, // psignd XMM3, -0x10[RBP]
0x0F, 0x38, 0x09, 0xCA, // psignw MM1, MM2
0x66, 0x0F, 0x38, 0x09, 0xCA, // psignw XMM1, XMM2
- 0x0F, 0x38, 0x09, 0x5D, 0xC8, // psignw MM3, -0x38[RBP]
- 0x66, 0x0F, 0x38, 0x09, 0x5D, 0xD0, // psignw XMM3, -0x30[RBP]
+ 0x0F, 0x38, 0x09, 0x5D, 0xE8, // psignw MM3, -0x18[RBP]
+ 0x66, 0x0F, 0x38, 0x09, 0x5D, 0xF0, // psignw XMM3, -0x10[RBP]
];
asm
@@ -4337,11 +4334,7 @@ L1: pop RAX;
mov p[RBP],RAX;
}
- foreach (i,b; data)
- {
- //printf("data[%d] = 0x%02x, should be 0x%02x\n", i, p[i], b);
- assert(p[i] == b);
- }
+ compareBytes(p, data);
}
/****************************************************/
@@ -4359,32 +4352,32 @@ void test58()
static ubyte data[] =
[
0x66, 0x0F, 0x3A, 0x0D, 0xCA, 3,// blendpd XMM1,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x0D, 0x5D, 0xD0, 3,// blendpd XMM3,XMMWORD PTR [RBP-0x30],0x3
+ 0x66, 0x0F, 0x3A, 0x0D, 0x5D, 0xF0, 3,// blendpd XMM3,XMMWORD PTR [RBP-0x10],0x3
0x66, 0x0F, 0x3A, 0x0C, 0xCA, 3,// blendps XMM1,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x0C, 0x5D, 0xD0, 3,// blendps XMM3,XMMWORD PTR [RBP-0x30],0x3
+ 0x66, 0x0F, 0x3A, 0x0C, 0x5D, 0xF0, 3,// blendps XMM3,XMMWORD PTR [RBP-0x10],0x3
0x66, 0x0F, 0x38, 0x15, 0xCA, // blendvpd XMM1,XMM2,XMM0
- 0x66, 0x0F, 0x38, 0x15, 0x5D, 0xD0, // blendvpd XMM3,XMMWORD PTR [RBP-0x30],XMM0
+ 0x66, 0x0F, 0x38, 0x15, 0x5D, 0xF0, // blendvpd XMM3,XMMWORD PTR [RBP-0x10],XMM0
0x66, 0x0F, 0x38, 0x14, 0xCA, // blendvps XMM1,XMM2,XMM0
- 0x66, 0x0F, 0x38, 0x14, 0x5D, 0xD0, // blendvps XMM3,XMMWORD PTR [RBP-0x30],XMM0
+ 0x66, 0x0F, 0x38, 0x14, 0x5D, 0xF0, // blendvps XMM3,XMMWORD PTR [RBP-0x10],XMM0
0x66, 0x0F, 0x3A, 0x41, 0xCA, 3,// dppd XMM1,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x41, 0x5D, 0xD0, 3,// dppd XMM3,XMMWORD PTR [RBP-0x30],0x3
+ 0x66, 0x0F, 0x3A, 0x41, 0x5D, 0xF0, 3,// dppd XMM3,XMMWORD PTR [RBP-0x10],0x3
0x66, 0x0F, 0x3A, 0x40, 0xCA, 3,// dpps XMM1,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x40, 0x5D, 0xD0, 3,// dpps XMM3,XMMWORD PTR [RBP-0x30],0x3
+ 0x66, 0x0F, 0x3A, 0x40, 0x5D, 0xF0, 3,// dpps XMM3,XMMWORD PTR [RBP-0x10],0x3
0x66, 0x0F, 0x3A, 0x17, 0xD2, 3,// extractps EDX,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x17, 0x55, 0xBC, 3,// extractps DWORD PTR [RBP-0x44],XMM2,0x3
+ 0x66, 0x0F, 0x3A, 0x17, 0x55, 0xDC, 3,// extractps DWORD PTR [RBP-0x24],XMM2,0x3
0x66, 0x0F, 0x3A, 0x21, 0xCA, 3,// insertps XMM1,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x21, 0x5D, 0xBC, 3,// insertps XMM3,DWORD PTR [RBP-0x44],0x3
- 0x66, 0x0F, 0x38, 0x2A, 0x4D, 0xD0, // movntdqa XMM1,XMMWORD PTR [RBP-0x30]
+ 0x66, 0x0F, 0x3A, 0x21, 0x5D, 0xDC, 3,// insertps XMM3,DWORD PTR [RBP-0x24],0x3
+ 0x66, 0x0F, 0x38, 0x2A, 0x4D, 0xF0, // movntdqa XMM1,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x3A, 0x42, 0xCA, 3,// mpsadbw XMM1,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x42, 0x5D, 0xD0, 3,// mpsadbw XMM3,XMMWORD PTR [RBP-0x30],0x3
+ 0x66, 0x0F, 0x3A, 0x42, 0x5D, 0xF0, 3,// mpsadbw XMM3,XMMWORD PTR [RBP-0x10],0x3
0x66, 0x0F, 0x38, 0x2B, 0xCA, // packusdw XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x2B, 0x5D, 0xD0, // packusdw XMM3,XMMWORD PTR [RBP-0x30]
+ 0x66, 0x0F, 0x38, 0x2B, 0x5D, 0xF0, // packusdw XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x38, 0x10, 0xCA, // pblendvb XMM1,XMM2,XMM0
- 0x66, 0x0F, 0x38, 0x10, 0x5D, 0xD0, // pblendvb XMM3,XMMWORD PTR [RBP-0x30],XMM0
+ 0x66, 0x0F, 0x38, 0x10, 0x5D, 0xF0, // pblendvb XMM3,XMMWORD PTR [RBP-0x10],XMM0
0x66, 0x0F, 0x3A, 0x0E, 0xCA, 3,// pblendw XMM1,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x0E, 0x5D, 0xD0, 3,// pblendw XMM3,XMMWORD PTR [RBP-0x30],0x3
+ 0x66, 0x0F, 0x3A, 0x0E, 0x5D, 0xF0, 3,// pblendw XMM3,XMMWORD PTR [RBP-0x10],0x3
0x66, 0x0F, 0x38, 0x29, 0xCA, // pcmpeqq XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x29, 0x5D, 0xD0, // pcmpeqq XMM3,XMMWORD PTR [RBP-0x30]
+ 0x66, 0x0F, 0x38, 0x29, 0x5D, 0xF0, // pcmpeqq XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x3A, 0x14, 0xD0, 3,// pextrb EAX,XMM2,0x3
0x66, 0x0F, 0x3A, 0x14, 0xD3, 3,// pextrb EBX,XMM2,0x3
0x66, 0x0F, 0x3A, 0x14, 0xD1, 3,// pextrb ECX,XMM2,0x3
@@ -4393,17 +4386,17 @@ void test58()
0x66, 0x0F, 0x3A, 0x14, 0xD3, 3,// pextrb EBX,XMM2,0x3
0x66, 0x41, 0x0F, 0x3A, 0x14, 0xD0, 3,// pextrb R8D,XMM2,0x3
0x66, 0x41, 0x0F, 0x3A, 0x14, 0xD2, 3,// pextrb R10D,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x14, 0x5D, 0xB8, 3,// pextrb BYTE PTR [RBP-0x48],XMM3,0x3
+ 0x66, 0x0F, 0x3A, 0x14, 0x5D, 0xD8, 3,// pextrb BYTE PTR [RBP-0x28],XMM3,0x3
0x66, 0x0F, 0x3A, 0x16, 0xD0, 3,// pextrd EAX,XMM2,0x3
0x66, 0x0F, 0x3A, 0x16, 0xD3, 3,// pextrd EBX,XMM2,0x3
0x66, 0x0F, 0x3A, 0x16, 0xD1, 3,// pextrd ECX,XMM2,0x3
0x66, 0x0F, 0x3A, 0x16, 0xD2, 3,// pextrd EDX,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x16, 0x5D, 0xBC, 3,// pextrd DWORD PTR [RBP-0x44],XMM3,0x3
+ 0x66, 0x0F, 0x3A, 0x16, 0x5D, 0xDC, 3,// pextrd DWORD PTR [RBP-0x24],XMM3,0x3
0x66, 0x48, 0x0F, 0x3A, 0x16, 0xD0, 3,// pextrq RAX,XMM2,0x3
0x66, 0x48, 0x0F, 0x3A, 0x16, 0xD3, 3,// pextrq RBX,XMM2,0x3
0x66, 0x48, 0x0F, 0x3A, 0x16, 0xD1, 3,// pextrq RCX,XMM2,0x3
0x66, 0x48, 0x0F, 0x3A, 0x16, 0xD2, 3,// pextrq RDX,XMM2,0x3
- 0x66, 0x48, 0x0F, 0x3A, 0x16, 0x5D, 0xC0, 3,// pextrq QWORD PTR [RBP-0x40],XMM3,0x3
+ 0x66, 0x48, 0x0F, 0x3A, 0x16, 0x5D, 0xE0, 3,// pextrq QWORD PTR [RBP-0x20],XMM3,0x3
0x66, 0x0F, 0xC5, 0xC2, 3,// pextrw EAX,XMM2,0x3
0x66, 0x0F, 0xC5, 0xDA, 3,// pextrw EBX,XMM2,0x3
0x66, 0x0F, 0xC5, 0xCA, 3,// pextrw ECX,XMM2,0x3
@@ -4412,78 +4405,78 @@ void test58()
0x66, 0x0F, 0xC5, 0xDA, 3,// pextrw EBX,XMM2,0x3
0x66, 0x44, 0x0F, 0xC5, 0xC2, 3,// pextrw R8D,XMM2,0x3
0x66, 0x44, 0x0F, 0xC5, 0xD2, 3,// pextrw R10D,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x15, 0x5D, 0xBA, 3,// pextrw WORD PTR [RBP-0x46],XMM3,0x3
+ 0x66, 0x0F, 0x3A, 0x15, 0x5D, 0xDA, 3,// pextrw WORD PTR [RBP-0x26],XMM3,0x3
0x66, 0x0F, 0x38, 0x41, 0xCA, // phminposuw XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x41, 0x5D, 0xD0, // phminposuw XMM3,XMMWORD PTR [RBP-0x30]
+ 0x66, 0x0F, 0x38, 0x41, 0x5D, 0xF0, // phminposuw XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x3A, 0x20, 0xC8, 3,// pinsrb XMM1,EAX,0x3
0x66, 0x0F, 0x3A, 0x20, 0xCB, 3,// pinsrb XMM1,EBX,0x3
0x66, 0x0F, 0x3A, 0x20, 0xC9, 3,// pinsrb XMM1,ECX,0x3
0x66, 0x0F, 0x3A, 0x20, 0xCA, 3,// pinsrb XMM1,EDX,0x3
- 0x66, 0x0F, 0x3A, 0x20, 0x5D, 0xB8, 3,// pinsrb XMM3,BYTE PTR [RBP-0x48],0x3
+ 0x66, 0x0F, 0x3A, 0x20, 0x5D, 0xD8, 3,// pinsrb XMM3,BYTE PTR [RBP-0x28],0x3
0x66, 0x0F, 0x3A, 0x22, 0xC8, 3,// pinsrd XMM1,EAX,0x3
0x66, 0x0F, 0x3A, 0x22, 0xCB, 3,// pinsrd XMM1,EBX,0x3
0x66, 0x0F, 0x3A, 0x22, 0xC9, 3,// pinsrd XMM1,ECX,0x3
0x66, 0x0F, 0x3A, 0x22, 0xCA, 3,// pinsrd XMM1,EDX,0x3
- 0x66, 0x0F, 0x3A, 0x22, 0x5D, 0xBC, 3,// pinsrd XMM3,DWORD PTR [RBP-0x44],0x3
+ 0x66, 0x0F, 0x3A, 0x22, 0x5D, 0xDC, 3,// pinsrd XMM3,DWORD PTR [RBP-0x24],0x3
0x66, 0x48, 0x0F, 0x3A, 0x22, 0xC8, 3,// pinsrq XMM1,RAX,0x3
0x66, 0x48, 0x0F, 0x3A, 0x22, 0xCB, 3,// pinsrq XMM1,RBX,0x3
0x66, 0x48, 0x0F, 0x3A, 0x22, 0xC9, 3,// pinsrq XMM1,RCX,0x3
0x66, 0x48, 0x0F, 0x3A, 0x22, 0xCA, 3,// pinsrq XMM1,RDX,0x3
- 0x66, 0x48, 0x0F, 0x3A, 0x22, 0x5D, 0xC0, 3,// pinsrq XMM3,QWORD PTR [RBP-0x40],0x3
+ 0x66, 0x48, 0x0F, 0x3A, 0x22, 0x5D, 0xE0, 3,// pinsrq XMM3,QWORD PTR [RBP-0x20],0x3
0x66, 0x0F, 0x38, 0x3C, 0xCA, // pmaxsb XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x3C, 0x5D, 0xD0, // pmaxsb XMM3,XMMWORD PTR [RBP-0x30]
+ 0x66, 0x0F, 0x38, 0x3C, 0x5D, 0xF0, // pmaxsb XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x38, 0x3D, 0xCA, // pmaxsd XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x3D, 0x5D, 0xD0, // pmaxsd XMM3,XMMWORD PTR [RBP-0x30]
+ 0x66, 0x0F, 0x38, 0x3D, 0x5D, 0xF0, // pmaxsd XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x38, 0x3F, 0xCA, // pmaxud XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x3F, 0x5D, 0xD0, // pmaxud XMM3,XMMWORD PTR [RBP-0x30]
+ 0x66, 0x0F, 0x38, 0x3F, 0x5D, 0xF0, // pmaxud XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x38, 0x3E, 0xCA, // pmaxuw XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x3E, 0x5D, 0xD0, // pmaxuw XMM3,XMMWORD PTR [RBP-0x30]
+ 0x66, 0x0F, 0x38, 0x3E, 0x5D, 0xF0, // pmaxuw XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x38, 0x38, 0xCA, // pminsb XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x38, 0x5D, 0xD0, // pminsb XMM3,XMMWORD PTR [RBP-0x30]
+ 0x66, 0x0F, 0x38, 0x38, 0x5D, 0xF0, // pminsb XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x38, 0x39, 0xCA, // pminsd XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x39, 0x5D, 0xD0, // pminsd XMM3,XMMWORD PTR [RBP-0x30]
+ 0x66, 0x0F, 0x38, 0x39, 0x5D, 0xF0, // pminsd XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x38, 0x3B, 0xCA, // pminud XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x3B, 0x5D, 0xD0, // pminud XMM3,XMMWORD PTR [RBP-0x30]
+ 0x66, 0x0F, 0x38, 0x3B, 0x5D, 0xF0, // pminud XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x38, 0x3A, 0xCA, // pminuw XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x3A, 0x5D, 0xD0, // pminuw XMM3,XMMWORD PTR [RBP-0x30]
+ 0x66, 0x0F, 0x38, 0x3A, 0x5D, 0xF0, // pminuw XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x38, 0x20, 0xCA, // pmovsxbw XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x20, 0x5D, 0xC0, // pmovsxbw XMM3,QWORD PTR [RBP-0x40]
+ 0x66, 0x0F, 0x38, 0x20, 0x5D, 0xE0, // pmovsxbw XMM3,QWORD PTR [RBP-0x20]
0x66, 0x0F, 0x38, 0x21, 0xCA, // pmovsxbd XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x21, 0x5D, 0xBC, // pmovsxbd XMM3,DWORD PTR [RBP-0x44]
+ 0x66, 0x0F, 0x38, 0x21, 0x5D, 0xDC, // pmovsxbd XMM3,DWORD PTR [RBP-0x24]
0x66, 0x0F, 0x38, 0x22, 0xCA, // pmovsxbq XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x22, 0x5D, 0xBA, // pmovsxbq XMM3,WORD PTR [RBP-0x46]
+ 0x66, 0x0F, 0x38, 0x22, 0x5D, 0xDA, // pmovsxbq XMM3,WORD PTR [RBP-0x26]
0x66, 0x0F, 0x38, 0x23, 0xCA, // pmovsxwd XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x23, 0x5D, 0xC0, // pmovsxwd XMM3,QWORD PTR [RBP-0x40]
+ 0x66, 0x0F, 0x38, 0x23, 0x5D, 0xE0, // pmovsxwd XMM3,QWORD PTR [RBP-0x20]
0x66, 0x0F, 0x38, 0x24, 0xCA, // pmovsxwq XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x24, 0x5D, 0xBC, // pmovsxwq XMM3,DWORD PTR [RBP-0x44]
+ 0x66, 0x0F, 0x38, 0x24, 0x5D, 0xDC, // pmovsxwq XMM3,DWORD PTR [RBP-0x24]
0x66, 0x0F, 0x38, 0x25, 0xCA, // pmovsxdq XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x25, 0x5D, 0xC0, // pmovsxdq XMM3,QWORD PTR [RBP-0x40]
+ 0x66, 0x0F, 0x38, 0x25, 0x5D, 0xE0, // pmovsxdq XMM3,QWORD PTR [RBP-0x20]
0x66, 0x0F, 0x38, 0x30, 0xCA, // pmovzxbw XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x30, 0x5D, 0xC0, // pmovzxbw XMM3,QWORD PTR [RBP-0x40]
+ 0x66, 0x0F, 0x38, 0x30, 0x5D, 0xE0, // pmovzxbw XMM3,QWORD PTR [RBP-0x20]
0x66, 0x0F, 0x38, 0x31, 0xCA, // pmovzxbd XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x31, 0x5D, 0xBC, // pmovzxbd XMM3,DWORD PTR [RBP-0x44]
+ 0x66, 0x0F, 0x38, 0x31, 0x5D, 0xDC, // pmovzxbd XMM3,DWORD PTR [RBP-0x24]
0x66, 0x0F, 0x38, 0x32, 0xCA, // pmovzxbq XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x32, 0x5D, 0xBA, // pmovzxbq XMM3,WORD PTR [RBP-0x46]
+ 0x66, 0x0F, 0x38, 0x32, 0x5D, 0xDA, // pmovzxbq XMM3,WORD PTR [RBP-0x26]
0x66, 0x0F, 0x38, 0x33, 0xCA, // pmovzxwd XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x33, 0x5D, 0xC0, // pmovzxwd XMM3,QWORD PTR [RBP-0x40]
+ 0x66, 0x0F, 0x38, 0x33, 0x5D, 0xE0, // pmovzxwd XMM3,QWORD PTR [RBP-0x20]
0x66, 0x0F, 0x38, 0x34, 0xCA, // pmovzxwq XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x34, 0x5D, 0xBC, // pmovzxwq XMM3,DWORD PTR [RBP-0x44]
+ 0x66, 0x0F, 0x38, 0x34, 0x5D, 0xDC, // pmovzxwq XMM3,DWORD PTR [RBP-0x24]
0x66, 0x0F, 0x38, 0x35, 0xCA, // pmovzxdq XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x35, 0x5D, 0xC0, // pmovzxdq XMM3,QWORD PTR [RBP-0x40]
+ 0x66, 0x0F, 0x38, 0x35, 0x5D, 0xE0, // pmovzxdq XMM3,QWORD PTR [RBP-0x20]
0x66, 0x0F, 0x38, 0x28, 0xCA, // pmuldq XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x28, 0x5D, 0xD0, // pmuldq XMM3,XMMWORD PTR [RBP-0x30]
+ 0x66, 0x0F, 0x38, 0x28, 0x5D, 0xF0, // pmuldq XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x38, 0x40, 0xCA, // pmulld XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x40, 0x5D, 0xD0, // pmulld XMM3,XMMWORD PTR [RBP-0x30]
+ 0x66, 0x0F, 0x38, 0x40, 0x5D, 0xF0, // pmulld XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x38, 0x17, 0xCA, // ptest XMM1,XMM2
- 0x66, 0x0F, 0x38, 0x17, 0x5D, 0xD0, // ptest XMM3,XMMWORD PTR [RBP-0x30]
+ 0x66, 0x0F, 0x38, 0x17, 0x5D, 0xF0, // ptest XMM3,XMMWORD PTR [RBP-0x10]
0x66, 0x0F, 0x3A, 0x09, 0xCA, 3,// roundpd XMM1,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x09, 0x5D, 0xD0, 3,// roundpd XMM3,XMMWORD PTR [RBP-0x30],0x3
+ 0x66, 0x0F, 0x3A, 0x09, 0x5D, 0xF0, 3,// roundpd XMM3,XMMWORD PTR [RBP-0x10],0x3
0x66, 0x0F, 0x3A, 0x08, 0xCA, 3,// roundps XMM1,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x08, 0x5D, 0xD0, 3,// roundps XMM3,XMMWORD PTR [RBP-0x30],0x3
+ 0x66, 0x0F, 0x3A, 0x08, 0x5D, 0xF0, 3,// roundps XMM3,XMMWORD PTR [RBP-0x10],0x3
0x66, 0x0F, 0x3A, 0x0B, 0xCA, 3,// roundsd XMM1,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x0B, 0x5D, 0xC0, 3,// roundsd XMM3,QWORD PTR [RBP-0x40],0x3
+ 0x66, 0x0F, 0x3A, 0x0B, 0x5D, 0xE0, 3,// roundsd XMM3,QWORD PTR [RBP-0x20],0x3
0x66, 0x0F, 0x3A, 0x0A, 0xCA, 3,// roundss XMM1,XMM2,0x3
- 0x66, 0x0F, 0x3A, 0x0A, 0x4D, 0xBC, 3,// roundss xmm1,dword ptr [rbp-0x44],0x3
+ 0x66, 0x0F, 0x3A, 0x0A, 0x4D, 0xDC, 3,// roundss xmm1,dword ptr [rbp-0x24],0x3
];
asm
@@ -4669,11 +4662,7 @@ L1: pop RAX;
mov p[RBP],RAX;
}
- foreach (i,b; data)
- {
- //printf("data[%d] = 0x%02x, should be 0x%02x\n", i, p[i], b);
- assert(p[i] == b);
- }
+ compareBytes(p, data);
}
/****************************************************/
@@ -4695,27 +4684,27 @@ void test59()
0xF2, 0x0F, 0x38, 0xF1, 0xC1, // crc32 EAX, ECX
0xF2, 0x48, 0x0F, 0x38, 0xF0, 0xC1, // crc32 RAX, CL
0xF2, 0x48, 0x0F, 0x38, 0xF1, 0xC1, // crc32 RAX, RCX
-0xF2, 0x0F, 0x38, 0xF0, 0x55, 0xB8, // crc32 EDX, byte ptr [RBP-0x48]
-0x66, 0xF2, 0x0F, 0x38, 0xF1, 0x55, 0xBA, // crc32 EDX, word ptr [RBP-0x46]
-0xF2, 0x0F, 0x38, 0xF1, 0x55, 0xBC, // crc32 EDX,dword ptr [RBP-0x44]
-0xF2, 0x48, 0x0F, 0x38, 0xF0, 0x55, 0xB8, // crc32 RDX, byte ptr [RBP-0x48]
-0xF2, 0x48, 0x0F, 0x38, 0xF1, 0x55, 0xC0, // crc32 RDX,qword ptr [RBP-0x40]
+0xF2, 0x0F, 0x38, 0xF0, 0x55, 0xD8, // crc32 EDX, byte ptr [RBP-0x28]
+0x66, 0xF2, 0x0F, 0x38, 0xF1, 0x55, 0xDA, // crc32 EDX, word ptr [RBP-0x26]
+0xF2, 0x0F, 0x38, 0xF1, 0x55, 0xDC, // crc32 EDX,dword ptr [RBP-0x24]
+0xF2, 0x48, 0x0F, 0x38, 0xF0, 0x55, 0xD8, // crc32 RDX, byte ptr [RBP-0x28]
+0xF2, 0x48, 0x0F, 0x38, 0xF1, 0x55, 0xE0, // crc32 RDX,qword ptr [RBP-0x20]
0x66, 0x0F, 0x3A, 0x61, 0xCA, 2, // pcmpestri XMM1,XMM2, 2
-0x66, 0x0F, 0x3A, 0x61, 0x5D, 0xD0, 2, // pcmpestri XMM3,xmmword ptr [RBP-0x30], 2
+0x66, 0x0F, 0x3A, 0x61, 0x5D, 0xF0, 2, // pcmpestri XMM3,xmmword ptr [RBP-0x10], 2
0x66, 0x0F, 0x3A, 0x60, 0xCA, 2, // pcmpestrm XMM1,XMM2, 2
-0x66, 0x0F, 0x3A, 0x60, 0x5D, 0xD0, 2, // pcmpestrm XMM3,xmmword ptr [RBP-0x30], 2
+0x66, 0x0F, 0x3A, 0x60, 0x5D, 0xF0, 2, // pcmpestrm XMM3,xmmword ptr [RBP-0x10], 2
0x66, 0x0F, 0x3A, 0x63, 0xCA, 2, // pcmpistri XMM1,XMM2, 2
-0x66, 0x0F, 0x3A, 0x63, 0x5D, 0xD0, 2, // pcmpistri XMM3,xmmword ptr [RBP-0x30], 2
+0x66, 0x0F, 0x3A, 0x63, 0x5D, 0xF0, 2, // pcmpistri XMM3,xmmword ptr [RBP-0x10], 2
0x66, 0x0F, 0x3A, 0x62, 0xCA, 2, // pcmpistrm XMM1,XMM2, 2
-0x66, 0x0F, 0x3A, 0x62, 0x5D, 0xD0, 2, // pcmpistrm XMM3,xmmword ptr [RBP-0x30], 2
+0x66, 0x0F, 0x3A, 0x62, 0x5D, 0xF0, 2, // pcmpistrm XMM3,xmmword ptr [RBP-0x10], 2
0x66, 0x0F, 0x38, 0x37, 0xCA, // pcmpgtq XMM1,XMM2
-0x66, 0x0F, 0x38, 0x37, 0x5D, 0xD0, // pcmpgtq XMM3,xmmword ptr [RBP-0x30]
+0x66, 0x0F, 0x38, 0x37, 0x5D, 0xF0, // pcmpgtq XMM3,xmmword ptr [RBP-0x10]
0x66, 0xF3, 0x0F, 0xB8, 0xC1, // popcnt AX, CX
0xF3, 0x0F, 0xB8, 0xC1, // popcnt EAX, ECX
0xF3, 0x48, 0x0F, 0xB8, 0xC1, // popcnt RAX, RCX
-0x66, 0xF3, 0x0F, 0xB8, 0x55, 0xBA, // popcnt DX, word ptr [RBP-0x46]
-0xF3, 0x0F, 0xB8, 0x55, 0xBC, // popcnt EDX,dword ptr [RBP-0x44]
-0xF3, 0x48, 0x0F, 0xB8, 0x55, 0xC0 // popcnt RDX,qword ptr [RBP-0x40]
+0x66, 0xF3, 0x0F, 0xB8, 0x55, 0xDA, // popcnt DX, word ptr [RBP-0x26]
+0xF3, 0x0F, 0xB8, 0x55, 0xDC, // popcnt EDX,dword ptr [RBP-0x24]
+0xF3, 0x48, 0x0F, 0xB8, 0x55, 0xE0 // popcnt RDX,qword ptr [RBP-0x20]
];
asm
@@ -4759,11 +4748,7 @@ L1: pop RAX;
mov p[RBP],RAX;
}
- foreach (i,b; data)
- {
- //printf("data[%d] = 0x%02x, should be 0x%02x\n", i, p[i], b);
- assert(p[i] == b);
- }
+ compareBytes(p, data);
}
void test60()
@@ -4820,10 +4805,8 @@ L1:
pop RBX ;
mov p[RBP],RBX ;
}
- for (i = 0; i < data.length; i++)
- {
- assert(p[i] == data[i]);
- }
+
+ compareBytes(p, data);
}
/****************************************************/
Something went wrong with that request. Please try again.