File tree Expand file tree Collapse file tree 3 files changed +57
-0
lines changed Expand file tree Collapse file tree 3 files changed +57
-0
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,10 @@ class SIMDLoadOp(Field):
187
187
"""A SIMD load opcode."""
188
188
189
189
190
+ class SIMDLoadStoreLaneOp (Field ):
191
+ """A SIMD Load/Store Lane opcode."""
192
+
193
+
190
194
class Expression :
191
195
"""Core class from which all expressions inherit."""
192
196
@@ -446,6 +450,22 @@ class SIMDLoad(Expression):
446
450
methods = ['Index getMemBytes();' ]
447
451
448
452
453
+ class SIMDLoadStoreLane (Expression ):
454
+ op = SIMDLoadStoreLaneOp ()
455
+ offset = Address ()
456
+ align = Address ()
457
+ index = uint8_t ()
458
+ ptr = Child ()
459
+ vec = Child ()
460
+
461
+ methods = [
462
+ 'bool isStore();' ,
463
+ 'bool isLoad() { return !isStore(); }' ,
464
+ 'Index getMemBytes();' ,
465
+ 'void finalize();'
466
+ ]
467
+
468
+
449
469
class MemoryInit (Expression ):
450
470
segment = Index ()
451
471
dest = Child ()
Original file line number Diff line number Diff line change @@ -377,6 +377,27 @@ case Expression::SIMDLoadId: {
377
377
rightStack .push_back (castRight -> ptr );
378
378
break ;
379
379
}
380
+ case Expression ::SIMDLoadStoreLaneId : {
381
+ auto* castLeft = left -> cast < SIMDLoadStoreLane > ( );
382
+ auto* castRight = right -> cast < SIMDLoadStoreLane > ( );
383
+ if (castLeft -> op != castRight -> op ) {
384
+ return false;
385
+ }
386
+ if (castLeft -> offset != castRight -> offset ) {
387
+ return false;
388
+ }
389
+ if (castLeft -> align != castRight -> align ) {
390
+ return false;
391
+ }
392
+ if (castLeft -> index != castRight -> index ) {
393
+ return false;
394
+ }
395
+ leftStack .push_back (castLeft -> ptr );
396
+ rightStack .push_back (castRight -> ptr );
397
+ leftStack .push_back (castLeft -> vec );
398
+ rightStack .push_back (castRight -> vec );
399
+ break ;
400
+ }
380
401
case Expression ::MemoryInitId : {
381
402
auto* castLeft = left -> cast < MemoryInit > ( );
382
403
auto* castRight = right -> cast < MemoryInit > ( );
Original file line number Diff line number Diff line change @@ -258,6 +258,22 @@ class SIMDLoad : public SpecificExpression<Expression::SIMDLoadId> {
258
258
Index getMemBytes ();
259
259
void finalize ();
260
260
};
261
+ class SIMDLoadStoreLane
262
+ : public SpecificExpression<Expression::SIMDLoadStoreLaneId> {
263
+ public:
264
+ SIMDLoadStoreLane () {}
265
+ SIMDLoadStoreLane (MixedArena& allocator) : SIMDLoadStoreLane() {}
266
+ SIMDLoadStoreLaneOp op;
267
+ Address offset;
268
+ Address align;
269
+ uint8_t index;
270
+ Expression* ptr;
271
+ Expression* vec;
272
+ bool isStore ();
273
+ bool isLoad () { return !isStore (); }
274
+ Index getMemBytes ();
275
+ void finalize ();
276
+ };
261
277
class MemoryInit : public SpecificExpression <Expression::MemoryInitId> {
262
278
public:
263
279
MemoryInit () {}
You can’t perform that action at this time.
0 commit comments