mirror of
https://github.com/corda/corda.git
synced 2025-01-08 14:03:06 +00:00
support absolute operands on virtual stack and absolute to memory movs
This commit is contained in:
parent
740e86a084
commit
33b2a4a1e8
@ -262,6 +262,8 @@ class AbsoluteOperand: public MyOperand {
|
|||||||
value(value)
|
value(value)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
virtual StackOperand* logicalPush(Context* c);
|
||||||
|
|
||||||
virtual void apply(Context* c, Operation operation);
|
virtual void apply(Context* c, Operation operation);
|
||||||
|
|
||||||
virtual void apply(Context* c, Operation operation, MyOperand* operand) {
|
virtual void apply(Context* c, Operation operation, MyOperand* operand) {
|
||||||
@ -295,6 +297,7 @@ class MemoryOperand: public MyOperand {
|
|||||||
|
|
||||||
virtual void accept(Context*, Operation, RegisterOperand*);
|
virtual void accept(Context*, Operation, RegisterOperand*);
|
||||||
virtual void accept(Context*, Operation, ImmediateOperand*);
|
virtual void accept(Context*, Operation, ImmediateOperand*);
|
||||||
|
virtual void accept(Context*, Operation, AbsoluteOperand*);
|
||||||
|
|
||||||
MyOperand* base;
|
MyOperand* base;
|
||||||
int displacement;
|
int displacement;
|
||||||
@ -851,6 +854,13 @@ ImmediateOperand::apply(Context* c, Operation operation)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StackOperand*
|
||||||
|
AbsoluteOperand::logicalPush(Context* c)
|
||||||
|
{
|
||||||
|
return c->stack = new (c->zone.allocate(sizeof(StackOperand)))
|
||||||
|
StackOperand(this, c->stack);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
AbsoluteOperand::apply(Context* c, Operation operation)
|
AbsoluteOperand::apply(Context* c, Operation operation)
|
||||||
{
|
{
|
||||||
@ -914,6 +924,24 @@ MemoryOperand::accept(Context* c, Operation operation,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
MemoryOperand::accept(Context* c, Operation operation,
|
||||||
|
AbsoluteOperand* operand)
|
||||||
|
{
|
||||||
|
switch (operation) {
|
||||||
|
case mov: {
|
||||||
|
RegisterOperand* tmp = temporary(c, true);
|
||||||
|
|
||||||
|
tmp->accept(c, mov, operand);
|
||||||
|
accept(c, mov, tmp);
|
||||||
|
|
||||||
|
tmp->release(c);
|
||||||
|
} break;
|
||||||
|
|
||||||
|
default: abort(c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
unsigned
|
unsigned
|
||||||
PoolPromise::value(Context* c)
|
PoolPromise::value(Context* c)
|
||||||
{
|
{
|
||||||
|
@ -24,7 +24,7 @@ public class Misc {
|
|||||||
int c = a + b;
|
int c = a + b;
|
||||||
|
|
||||||
Misc m = new Misc();
|
Misc m = new Misc();
|
||||||
// String s = "hello";
|
String s = "hello";
|
||||||
// m.foo(s);
|
// m.foo(s);
|
||||||
// m.bar(s);
|
// m.bar(s);
|
||||||
// baz(s);
|
// baz(s);
|
||||||
|
Loading…
Reference in New Issue
Block a user