English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 29 May 2020, 17:18   #1
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,507
68040 CHK.L bug

Can anyone with 68040 confirm this strange bug:

moveq #0,d1
chk.l #$40000000,d1
moveq #1,d1
rts

This code unexpectedly skips "moveq #1,d1" (d1 is still 0 when RTS is executed). It seems to jump over next word, any single word instruction after CHK.L gets skipped.

But if CHK.L immediate value is for example #$20000000, it works correctly.

My tester found this last year. There is many undefined differences between models but this appears to be real bug. (I can attach test executable later if needed)
Toni Wilen is offline  
Old 29 May 2020, 20:17   #2
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 3,303
Confirmed here on A1200 Apollo 1240.
daxb is offline  
Old 29 May 2020, 22:46   #3
alexh
Thalion Webshrine
 
alexh's Avatar
 
Join Date: Jan 2004
Location: Oxford
Posts: 14,342
I'd be curious to know if this bug is only in the XC68040 chips and not in the later MC68040?

Motorola CPUs usually gain MC status only if it has no bugs or they've all been documented.

The MC68040 L88M mask of the 68040 was a very late rework and shrink. Unlike their XC counterparts they are cold to touch at 25MHz
alexh is offline  
Old 30 May 2020, 09:49   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,507
My 68040 is in Warp Engine and it has glued heatsink (not going to remove it).

68040 also seems to have another bug: RTR or RTE with odd PC in stack: address error stack frame SR is different than actual SR register contents at the start of address error handler. Stacked SR is SR before RTR modifications, real SR is correct.

This bug isn't going to affect any normal code

Last edited by Toni Wilen; 30 May 2020 at 10:02.
Toni Wilen is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
68040 to 68060 adapter respin with A2000 and Zeus 68040 Accelerator richx support.Hardware 14 26 April 2022 05:46
Amiga a3640 processor card and 68040/68040 processors Euphoria MarketPlace 3 26 February 2017 21:15
Bug in x64 file requester and bug in Blizzard PPC ROM filesize headkase support.WinUAE 5 26 June 2016 14:17
68040 vs 68060 tesla support.Hardware 10 20 April 2013 19:13
** CHK Exception ** CmdrVimes Coders. General 2 17 September 2010 16:14

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 07:52.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08924 seconds with 13 queries