Diff for /gforth/abi-code-test.fs between versions 1.1 and 1.2

version 1.1, 2010/04/05 22:17:56 version 1.2, 2010/04/18 16:39:55
Line 1 Line 1
   
 abi-code my+  ( n1 n2 -- n3 )  abi-code my+  ( n1 n2 -- n3 )
    di ax mov            \ ABI: sp passed in di, returned in ax  \ ABI: SP passed in di, returned in ax,  address of FP passed in si
    si dx mov            \ ABI: fp passed in si, returned in dx  \ Caller-saved: ax,cx,dx,si,di,r8-r11,xmm0-xmm15
    ax ) r8  mov         \ load sp[0]  8 di d) ax lea        \ compute new sp in result reg
    8 ax d) r8 add       \ add sp[1]  di )    dx mov        \ get old tos
    8 # ax  add          \ store result to *++sp  dx    ax ) add        \ add to new tos
    r8  ax ) mov  ret
    ret                  \ return to caller  
 end-code  end-code
   
 : my+-compiled   ( n1 n2 -- n3 ) my+ ;  : my+-compiled   ( n1 n2 -- n3 ) my+ ;
   
 assert0( 12 34 my+  46 = )  12 34 my+  46 <> throw
 assert0( 12 34 my+-compiled  46 = )  12 34 my+-compiled  46 <> throw

Removed from v.1.1  
changed lines
  Added in v.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>