forked from shattered/macro11
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some register label tests that don't work yet.
- Loading branch information
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
;;;;; | ||
; | ||
; Test expressions that evaluate to registers. | ||
; | ||
; !!! THIS TEST IS NOT RUN YET BECAUSE MANY OF THE CASES FAIL !!! | ||
; | ||
; All lines not marked "error" should assemble without complaint | ||
; as absolute values (no relocation etc). | ||
; | ||
; Section 3.4 (page 3-8) is a bit vague about the expressions that are allowed | ||
; after a %, but "the digit specifying the register can be replaced by any valid, | ||
; absolute term that can be evaluated during the first assembly pass." | ||
; It specifically mentions %3+1 to be the same as %4. | ||
; For the rest there is no indication where exactly register labels can be used. | ||
|
||
A = 1 | ||
|
||
l1 = %1 | ||
l2 = %1+1 | ||
l3 = %a | ||
l4 = %a + 1 | ||
l5 = %<1+1> | ||
l6 = <%1>+1 ; must be register! | ||
l7 = <%a>+1 ; must be register! | ||
l8 = %1 + %2 | ||
l8a = <%1> + <%2> ; must be register! | ||
l9 = %<%1 + %2> | ||
|
||
B = rti ; 2 | ||
|
||
l10 = %B | ||
l11 = %wait ; 1 | ||
|
||
l12 = %1. | ||
l13 = %7. | ||
l14 = %10 ; error: too large | ||
l15 = %8. ; error: too large | ||
|
||
mov #%2,%2 ; must not be a relocatable expression! | ||
mov #l1,%2 ; must not be a relocatable expression! | ||
mov #<%1+%2>,%3 ; must not be a relocatable expression! | ||
mov #<l1+1>,%3 ; must not be a relocatable expression! | ||
mov #<%l1+1>,%3 ; must not be a relocatable expression! | ||
|
||
l20 = %l1 | ||
l21 = %l20 | ||
|
||
l22 = l1 ; still a register | ||
l23 = l22 ; still a register | ||
|
||
.end | ||
|