Bug 196 - Macro + expression with floating point numbers outside FPU/DSP causes crashes
Summary: Macro + expression with floating point numbers outside FPU/DSP causes crashes
Status: UNCONFIRMED
Alias: None
Product: RMAC
Classification: Unclassified
Component: Core (show other bugs)
Version: unspecified
Hardware: All All
: Normal normal
Assignee: Shamus Hammons
URL:
Depends on:
Blocks:
 
Reported: 2022-04-03 12:04 CDT by ggn
Modified: 2022-04-03 12:04 CDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ggn 2022-04-03 12:04:51 CDT
Consider the following case:

    macro lol frames
    add.l #\{frames},d0
    .endm

    lol 2.5*50

This causes a nice crash, which I have seen is caused in during the macro parameter expansion here: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blob;f=token.c;h=55dbc290980722d06ed144755e43bb85587965a5;hb=HEAD#l519

I haven't got the time to debug this right now (and since the whole code there is full of "hack" comments I'd rather not do a quick fix.

(besides, the correct thing to do would be to probably enable arithmetic with floats in constants and cast them to integers)