aboutsummaryrefslogtreecommitdiffstats
path: root/prog/encodingexec.go
diff options
context:
space:
mode:
Diffstat (limited to 'prog/encodingexec.go')
-rw-r--r--prog/encodingexec.go10
1 files changed, 2 insertions, 8 deletions
diff --git a/prog/encodingexec.go b/prog/encodingexec.go
index ae885d3b1..27fa63350 100644
--- a/prog/encodingexec.go
+++ b/prog/encodingexec.go
@@ -194,16 +194,10 @@ func (p *Prog) SerializeForExec(buffer []byte) (int, error) {
}
func (target *Target) PhysicalAddr(arg *PointerArg) uint64 {
- if arg.Res == nil && arg.PagesNum == 0 {
+ if arg.IsNull() {
return 0
}
- addr := arg.PageIndex*target.PageSize + target.DataOffset
- if arg.PageOffset >= 0 {
- addr += uint64(arg.PageOffset)
- } else {
- addr += target.PageSize - uint64(-arg.PageOffset)
- }
- return addr
+ return target.DataOffset + arg.Address
}
type execContext struct {