Various 56k parser bugs #5

Open
opened 2024-02-29 16:59:20 +02:00 by ggn · 0 comments
Owner

After some tests a few illegal parallel move combinations have been uncovered in the parser. All the instructions in the following source should produce errors, but in current version they don't.

    .56001
    .org p:0
;**** 18 [test.asm 18]: ERROR --- Duplicate destination register not allowed (X data move field)
;18        P:0010 000021            ADC     X,A       #100,A
    ADC     X,A       #100,A
;**** 20 [test.asm 20]: ERROR --- Duplicate destination register not allowed (X data move field)
;20        P:0012 000021            ADC     X,A       #100,A0
    ADC     X,A       #100,A0

;**** 41 [test.asm 41]: ERROR --- Duplicate destination register not allowed (Y data move field)
;41        P:0024 000029            ADC     X,B                   Y:(R0)+N0,B
    ADC     X,B                   Y:(R0)+N0,B

;**** 65 [test.asm 65]: ERROR --- Duplicate destination register not allowed (Y data move field)
;65        P:003D 000039            ADC     Y,B       B,X:(R1)+   X0,B
    ADC     Y,B       B,X:(R1)+   X0,B

;**** 66 [test.asm 66]: ERROR --- Invalid register specified: x0 (Y data move field)
;66        P:003E 000039            ADC     Y,B       A,X:$1000   X0,A
    ADC     Y,B       A,X:$1000   X0,A

;**** 74 [test.asm 74]: ERROR --- Only register indirect addressing allowed (Y data move field)
;74        P:0045 000039            ADC     Y,B       Y0,A        A,Y:$10
    ADC     Y,B       Y0,A        A,Y:$10

The upcoming patch fixes all of them, plus doesn't break any regressions, which is always a plus :).

After some tests a few illegal parallel move combinations have been uncovered in the parser. All the instructions in the following source should produce errors, but in current version they don't. ``` .56001 .org p:0 ;**** 18 [test.asm 18]: ERROR --- Duplicate destination register not allowed (X data move field) ;18 P:0010 000021 ADC X,A #100,A ADC X,A #100,A ;**** 20 [test.asm 20]: ERROR --- Duplicate destination register not allowed (X data move field) ;20 P:0012 000021 ADC X,A #100,A0 ADC X,A #100,A0 ;**** 41 [test.asm 41]: ERROR --- Duplicate destination register not allowed (Y data move field) ;41 P:0024 000029 ADC X,B Y:(R0)+N0,B ADC X,B Y:(R0)+N0,B ;**** 65 [test.asm 65]: ERROR --- Duplicate destination register not allowed (Y data move field) ;65 P:003D 000039 ADC Y,B B,X:(R1)+ X0,B ADC Y,B B,X:(R1)+ X0,B ;**** 66 [test.asm 66]: ERROR --- Invalid register specified: x0 (Y data move field) ;66 P:003E 000039 ADC Y,B A,X:$1000 X0,A ADC Y,B A,X:$1000 X0,A ;**** 74 [test.asm 74]: ERROR --- Only register indirect addressing allowed (Y data move field) ;74 P:0045 000039 ADC Y,B Y0,A A,Y:$10 ADC Y,B Y0,A A,Y:$10 ``` The upcoming patch fixes all of them, plus doesn't break any regressions, which is always a plus :).
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: rmac/rmac#5
No description provided.