mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-17 04:24:37 +03:00
[ABI] Updated instruction DB, operands, and minor API changes
This changeset contains an updated instruction database that brings ARM32 instructions for the first time. It also updates instruction database tooling especially for ARM64, which will also be used by ARM32 generator. Additionally, new operan has been added, which represents a register list as used by ARM32 instruction set. Other minor changes are related to ARM - some stuff had to be moved to a64 namespace from arm namespace as it's incompatible between 32-bit and 64-bit ISA.
This commit is contained in:
16
db/base.js
16
db/base.js
@@ -205,7 +205,7 @@ class Operand {
|
||||
|
||||
toString() { return this.data; }
|
||||
|
||||
isReg() { return !!this.reg; }
|
||||
isReg() { return !!this.reg && this.type !== "reg-list"; }
|
||||
isMem() { return !!this.mem; }
|
||||
isImm() { return !!this.imm; }
|
||||
isRel() { return !!this.rel; }
|
||||
@@ -259,6 +259,20 @@ class Instruction {
|
||||
return out;
|
||||
}
|
||||
|
||||
get operandCount() {
|
||||
return this.operands.length;
|
||||
}
|
||||
|
||||
get minimumOperandCount() {
|
||||
const count = this.operands.length;
|
||||
for (let i = 0; i < count; i++) {
|
||||
if (this.operands[i].optional) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return count
|
||||
}
|
||||
|
||||
_assignAttribute(key, value) {
|
||||
switch (key) {
|
||||
case "ext":
|
||||
|
||||
Reference in New Issue
Block a user