mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-04-24 05:47:35 -04:00
Fixed predicate register encoding #2
This commit is contained in:
parent
72f5c06a3f
commit
1f34e759bc
1 changed files with 4 additions and 5 deletions
|
@ -8,8 +8,7 @@
|
|||
#include <iomanip>
|
||||
#include <vector>
|
||||
|
||||
|
||||
|
||||
#include "include/debug.h"
|
||||
#include "include/types.h"
|
||||
#include "include/util.h"
|
||||
#include "include/enc.h"
|
||||
|
@ -271,8 +270,8 @@ Instruction *WordDecoder::decode(const std::vector<Byte> &v, Size &idx) {
|
|||
Word code(readWord(v, idx, n/8));
|
||||
Instruction &inst = * new Instruction();
|
||||
|
||||
bool predicated = (code>>(i1+o+p));
|
||||
if (predicated) { inst.setPred((code>>(i1+o))&p); }
|
||||
bool predicated = (code>>(n-1));
|
||||
if (predicated) { inst.setPred((code>>(n-p-1))&pMask); }
|
||||
|
||||
Instruction::Opcode op = (Instruction::Opcode)((code>>i1)&oMask);
|
||||
inst.setOpcode(op);
|
||||
|
@ -346,7 +345,7 @@ Instruction *WordDecoder::decode(const std::vector<Byte> &v, Size &idx) {
|
|||
inst.setImmRef(*r);
|
||||
}
|
||||
|
||||
//cout << "Decoded 0x" << hex << code << " into: " << inst << '\n';
|
||||
D(2, "Decoded 0x" << hex << code << " into: " << inst << '\n');
|
||||
|
||||
return &inst;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue