1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-17 16:29:32 +00:00

fix rounding when converting to 16bit ints

This commit is contained in:
mrdudz 2022-09-17 18:35:30 +02:00
parent 3805c8754a
commit 4e61599779

View File

@ -45,18 +45,22 @@ eaxufloat:
; conversions: from float
.import _float32_to_int32
.import _float32_to_int32_round_to_zero
; float -> 16bit int
.export feaxint
feaxint:
; FIXME
jmp _float32_to_int32
jmp _float32_to_int32_round_to_zero
; jmp _float32_to_int32
; float -> 32bit int
.export feaxlong
feaxlong:
jmp _float32_to_int32
jmp _float32_to_int32_round_to_zero
; jmp _float32_to_int32
; the ! operator, returns a bool (int)
;------------------------------------------------------------------------------
; the ! operator, returns a bool (int)
.export fbnegeax
fbnegeax:
stx tmp1