Browse Source

* saveregisters also save the one needed for return values

pierre 25 years ago
parent
commit
366aece76e
1 changed files with 18 additions and 0 deletions
  1. 18 0
      tests/test/testsave.pp

+ 18 - 0
tests/test/testsave.pp

@@ -0,0 +1,18 @@
+
+
+function x : longint;saveregisters;
+begin
+  x:=34;
+end;
+
+var
+  y : longint;
+begin
+  asm
+    movl $15,%eax
+  end;
+  y:=x;
+  Writeln(y);
+  if y<>34 then
+    halt(1);
+end.