English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   Coders. Asm / Hardware (http://eab.abime.net/forumdisplay.php?f=112)
-   -   does it work everywhere or not (http://eab.abime.net/showthread.php?t=83270)

meynaf 28 June 2016 14:41

does it work everywhere or not
 
Hi asm guys, 040+ experts are wanted here.

That's just a few corner cases which i don't know for sure how they behave.
Upto 68030 i know, but for 68040/68060 i can't check. IIRC move16 (a0)+,(a0)+ will copy the data onto itself then increment a0 twice and i'm wondering if other stuff wouldn't behave the same...

Code:

move.l (a0)+,(a0)+    ; copies data on next long or onto itself ?
 move.l -(a0),-(a0)    ; -4(a0) to -8(a0) then a0-=4 ?
 move.l 8(a7),-(a7)    ; dec a7 done before or after a7+8 eval ?
 move.l (a7)+,(a7)    ; "+" done before or after dest (a7) eval ?
 pea (a7)              ; pushes value "as is" or not ?
 move.l a7,-(a7)      ; always equivalent to the above ? (movem.l isn't !)
 pea 4(a7)            ; pushes a7+4 or not ?


Don_Adan 28 June 2016 23:32

Quote:

Originally Posted by meynaf (Post 1098579)
Hi asm guys, 040+ experts are wanted here.

That's just a few corner cases which i don't know for sure how they behave.
Upto 68030 i know, but for 68040/68060 i can't check. IIRC move16 (a0)+,(a0)+ will copy the data onto itself then increment a0 twice and i'm wondering if other stuff wouldn't behave the same...

Code:

move.l (a0)+,(a0)+    ; copies data on next long or onto itself ?
 move.l -(a0),-(a0)    ; -4(a0) to -8(a0) then a0-=4 ?
 move.l 8(a7),-(a7)    ; dec a7 done before or after a7+8 eval ?
 move.l (a7)+,(a7)    ; "+" done before or after dest (a7) eval ?
 pea (a7)              ; pushes value "as is" or not ?
 move.l a7,-(a7)      ; always equivalent to the above ? (movem.l isn't !)
 pea 4(a7)            ; pushes a7+4 or not ?


Checked on 68040.
1. long data are copied, A0 is +8.
2. long data are copied, A0 is -8.
3. long data from 8(a7) are copied, A7 is -4.
4. long data from (a7)+ are copied, A7 is + 4.
5. A7 is pushed on stack.
6. same like pea (a7).
7. pushes a7+4.


All times are GMT +2. The time now is 07:48.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.

Page generated in 0.04341 seconds with 11 queries