POV-Ray : Newsgroups : povray.beta-test : Function (optimization?) bug : Re: Function (optimization?) bug Server Time
2 Nov 2024 07:26:51 EDT (-0400)
  Re: Function (optimization?) bug  
From: R  Suzuki
Date: 25 Dec 2001 20:26:56
Message: <3c292760@news.povray.org>
"Thorsten Froehlich" wrote
> For debugging, use
>
> #declare foo1 = function{"foo1.out" -y/1/(2)}
> #declare foo2 = function{"foo2.out" -y/1/2}
>
> and look at the output files.

Followings are the output.  Apparently, foo2 has a problem (while others are
ok).

--------------------------------------------------
#declare foo1 = function{"foo1.out" -y/1/(2)}

grow    3
load    SP(0),R2
load    SP(1),R3
load    SP(2),R4
move    R5,R6
move    R0,R5
move    R3,R0
neg     R0,R5
move    R5,R0
move    R6,R5
move    R0,R5
muli    1.000000,R5   # const(1)
loadi   2.000000,R0   # const(2)
div     R0,R5
move    R5,R0
rts


#declare foo2 = function{"foo2.out" -y/1/2}

grow    3
load    SP(0),R2
load    SP(1),R3
load    SP(2),R4
move    R5,R6
move    R0,R5
move    R3,R0
neg     R0,R5
move    R5,R0
move    R6,R5
move    R0,R5
muli    2.000000,R5   # const(2)
move    R5,R0
rts


#declare foo3 = function{"foo3.out" y/1/(2)}

grow    3
load    SP(0),R2
load    SP(1),R3
load    SP(2),R4
move    R3,R0
move    R0,R5
muli    1.000000,R5   # const(1)
loadi   2.000000,R0   # const(2)
div     R0,R5
move    R5,R0
rts


#declare foo4 = function{"foo4.out" y/1/2}

grow    3
load    SP(0),R2
load    SP(1),R3
load    SP(2),R4
move    R3,R0
move    R0,R5
muli    1.000000,R5   # const(1)
muli    0.500000,R5   # const(3)
move    R5,R0
rts
--------------------------------------------

R. Suzuki


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.