- implemented vector operations. Vectors are now fully working as local variables.
- removed mulv_kr and divv_kr instructions. The first are redundant and the second are useless. Maybe remove all other vector/const operations as well? They won't get used by the code generator. - fixed disassembly of vector multiplication and division instructions.
This commit is contained in:
parent
9400f97189
commit
e5878f0cb2
5 changed files with 193 additions and 62 deletions
|
|
@ -292,8 +292,10 @@ public:
|
|||
virtual bool RequestAddress(bool *writable);
|
||||
virtual PPrototype *ReturnProto();
|
||||
virtual VMFunction *GetDirectFunction();
|
||||
bool IsNumeric() const { return ValueType != TypeName && (ValueType->GetRegType() == REGT_INT || ValueType->GetRegType() == REGT_FLOAT); }
|
||||
bool IsNumeric() const { return ValueType != TypeName && ValueType->GetRegCount() == 1 && (ValueType->GetRegType() == REGT_INT || ValueType->GetRegType() == REGT_FLOAT); }
|
||||
bool IsInteger() const { return ValueType != TypeName && (ValueType->GetRegType() == REGT_INT); }
|
||||
bool IsPointer() const { return ValueType->GetRegType() == REGT_POINTER; }
|
||||
bool IsVector() const { return ValueType == TypeVector2 || ValueType == TypeVector3; };
|
||||
|
||||
virtual ExpEmit Emit(VMFunctionBuilder *build);
|
||||
|
||||
|
|
@ -1104,6 +1106,7 @@ class FxLocalVariable : public FxExpression
|
|||
public:
|
||||
FxLocalVariableDeclaration *Variable;
|
||||
bool AddressRequested;
|
||||
int RegOffset;
|
||||
|
||||
FxLocalVariable(FxLocalVariableDeclaration*, const FScriptPosition&);
|
||||
FxExpression *Resolve(FCompileContext&);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue