English Amiga Board Amiga Lore


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 28 June 2016, 01:23   #1
BlankVector
Registered User
 
Join Date: Jun 2012
Location: Paris, France
Posts: 148
movep on 68060

This is the sequel of the issue I incorrectly reported there due to wrong diagnostic.

I was fooled by the WinUAE debugger.
It is actually related to movep on 68060.

Facts:

1) The failing program is DESKTOP.PRG (Tera Desktop). It fails on 68060 because it uses movep. And it is well known that movep is not supported on 68060.

2) I was fooled by the wrong WinUAE disassembly.
The actual opcode is "movep.l d1,-7(a1)".
WinUAE disassembles it to:
Code:
00035AFA 03c9 fff9                [ MVPRM.L D1,(A1, -$0007) == $007fcb1b ]
00035AFC fff9                     ILLEGAL
I assume that MVPRM.L means "MOVEP.L register to memory". So the first line is good. But the second one is completely bogus: instead of advancing 4 bytes, it only advances 2 bytes and repeats the operand of the previous instruction, disassembled to ILLEGAL.
At first glance, I didn't notice that the offset of the second line was only 2 bytes after the previous 4-byte instruction. So I thought that a spurious word was inserted, suspecting IDE trouble. Actually, the memory is right, but the disassembly is wrong.
This is a WinUAE disassembly bug, this should be fixed.

3) When "Unimplemented CPU emu" is checked, the program fails with "Illegal instruction". I didn't expect that, because as far a I understand that checkbox should have emulated the missing movep.
This looks like an incomplete missing instructions emulation, WinUAE should be fixed for that.

4) When "Unimplemented CPU emu" is not checked, it fails with an exception number 61 "Unimplemented Integer Instruction". I don't know if this is accurate or not, intuitively I would have expected a classic "Illegal Instruction Exception".

So the situation is quite clear now.
Toni, you can tell me what is going to be fixed, and what is not.
BlankVector is offline  
AdSense AdSense  
Old 28 June 2016, 14:47   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,543
Quote:
Originally Posted by BlankVector View Post
Code:
00035AFA 03c9 fff9                [ MVPRM.L D1,(A1, -$0007) == $007fcb1b ]
00035AFC fff9                     ILLEGAL
[ opcode ] means instruction is not supported by selected CPU and it is by design to only increase PC by 2 in this case (because most likely reason was attempt to dissemle from mid instruction)

Quote:
3) When "Unimplemented CPU emu" is checked, the program fails with "Illegal instruction". I didn't expect that, because as far a I understand that checkbox should have emulated the missing movep.
This looks like an incomplete missing instructions emulation, WinUAE should be fixed for that.
Works for me. If "umimplemented CPU emu" is ticked, MOVEP.L executes normally.

Quote:
4) When "Unimplemented CPU emu" is not checked, it fails with an exception number 61 "Unimplemented Integer Instruction". I don't know if this is accurate or not, intuitively I would have expected a classic "Illegal Instruction Exception".
This is correct. 68060 separates between invalid and unimplemented instructions (=emulated by Motorola 68060 software package, included with 68060.library)
Toni Wilen is online now  
Old 28 June 2016, 22:04   #3
BlankVector
Registered User
 
Join Date: Jun 2012
Location: Paris, France
Posts: 148
Quote:
Originally Posted by Toni Wilen View Post
Works for me. If "umimplemented CPU emu" is ticked, MOVEP.L executes normally.
Are you fooled by some movep emulation implemented as an exception handler?

Here is a testcase, in the form of a modified EmuTOS ROM.
It contains the following code on startup:

Code:
        move.l  #illeg,4*4.w            // Illegal instruction
        move.l  #unimpl,61*4.w          // Unimplemented instruction

        lea     0x10000,a1
        move.l  #0x11223344,d1
        movep.l d1,-7(a1)

        move.w  #0x00f0,0xdff180        // Background color = green

loop:
        bra.s   loop

unimpl:
        move.w  #0x000f,0xdff180        // Background color = blue
        bra.s   loop

illeg:
        move.w  #0x0f00,0xdff180        // Background color = red
        bra.s   loop
So:
- If movep executes normally, the screen becomes green. This happens with 68000-68040.
- On normal 68060, the screen becomes blue, because an unimplemented instruction is generated, as expected.
- With 68060 and "Unimplemented CPU emu" checked, one would expect that the screen turns green, as on 68000. But it becomes red: it means that an illegal instruction is generated. There is no rational explication for that, this is why I believe this is a WinUAE bug.
Attached Files
File Type: zip movep.zip (135.2 KB, 22 views)
BlankVector is offline  
Old 28 June 2016, 22:19   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,543
It looks like my crystal ball is telling me that you are using "wrong" winuae version.
Toni Wilen is online now  
Old 28 June 2016, 23:50   #5
BlankVector
Registered User
 
Join Date: Jun 2012
Location: Paris, France
Posts: 148
Damn! I was indeed using the previous beta 17. After you fixed my IDE trouble with 68060. I couldn't imagine it was broken that way

I didn't even notice that WinUAE 3.3.0 had been released. Of course with that one, everything works perfectly

Many thanks again, Toni, and sorry for that mess. WinUAE rulez.
BlankVector is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chinese 68060 bebbo support.Hardware 11 28 June 2016 12:18
68040 vs 68060 tesla support.Hardware 10 20 April 2013 19:13
68060 Toni Wilen request.UAE Wishlist 20 29 May 2007 00:30
68060 glue request.UAE Wishlist 19 25 January 2007 00:00
68060 killergorilla support.Hardware 2 24 March 2003 16:50

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:43.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.12729 seconds with 12 queries