Fix fma to support large memory model.
It was not using long addressing where needed, so it could store results in the wrong bank.
This commit is contained in:
parent
2f2d3d2056
commit
bdfed3628d
20
math2.asm
20
math2.asm
|
@ -1214,15 +1214,15 @@ x_plus_z ldy extra if in first or second case above then
|
||||||
FADDX x = x + z
|
FADDX x = x + z
|
||||||
|
|
||||||
return_x lda x copy result to t1
|
return_x lda x copy result to t1
|
||||||
sta t1
|
sta >t1
|
||||||
lda x+2
|
lda x+2
|
||||||
sta t1+2
|
sta >t1+2
|
||||||
lda x+4
|
lda x+4
|
||||||
sta t1+4
|
sta >t1+4
|
||||||
lda x+6
|
lda x+6
|
||||||
sta t1+6
|
sta >t1+6
|
||||||
lda x+8
|
lda x+8
|
||||||
sta t1+8
|
sta >t1+8
|
||||||
brl ret return result
|
brl ret return result
|
||||||
|
|
||||||
;
|
;
|
||||||
|
@ -1522,18 +1522,18 @@ save_inf lda #32767 set it to infinity
|
||||||
lda #OVERFLOW+INEXACT set overflow and inexact exceptions
|
lda #OVERFLOW+INEXACT set overflow and inexact exceptions
|
||||||
tsb xcps
|
tsb xcps
|
||||||
do_save lda mant1+8 generate result
|
do_save lda mant1+8 generate result
|
||||||
sta t1
|
sta >t1
|
||||||
lda mant1+10
|
lda mant1+10
|
||||||
sta t1+2
|
sta >t1+2
|
||||||
lda mant1+12
|
lda mant1+12
|
||||||
sta t1+4
|
sta >t1+4
|
||||||
lda mant1+14
|
lda mant1+14
|
||||||
sta t1+6
|
sta >t1+6
|
||||||
lda exp1
|
lda exp1
|
||||||
asl a
|
asl a
|
||||||
asl sign1
|
asl sign1
|
||||||
ror a
|
ror a
|
||||||
sta t1+8
|
sta >t1+8
|
||||||
|
|
||||||
lda xcps if there were exceptions then
|
lda xcps if there were exceptions then
|
||||||
beq ret
|
beq ret
|
||||||
|
|
Loading…
Reference in New Issue