interp: support GEP on fixed (MMIO) addresses

GetElementPtr would not work on values that weren't pointers. Because
fixed addresses (often used in memory-mapped I/O) are integers rather
than pointers in interp, it would return an error.

This resulted in the teensy40 target not compiling correctly since the
interp package rewrite. This commit should fix that.
This commit is contained in:
Ayke van Laethem
2021-02-22 20:49:02 +01:00
committed by Ron Evans
parent 42088f938e
commit 34b50efdcd
4 changed files with 21 additions and 8 deletions
+1 -1
View File
@@ -102,7 +102,7 @@ func Run(mod llvm.Module, debug bool) error {
if callErr != nil {
if isRecoverableError(callErr.Err) {
if r.debug {
fmt.Fprintln(os.Stderr, "not interpretring", r.pkgName, "because of error:", callErr.Err)
fmt.Fprintln(os.Stderr, "not interpreting", r.pkgName, "because of error:", callErr.Error())
}
mem.revert()
continue