English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 26 January 2019, 20:20   #41
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 22,454
Fixed, brief extension word scale factor was lost when 68020+ disassembly was recently fixed..
Toni Wilen is offline  
Old 26 January 2019, 21:18   #42
ross
Sum, ergo Cogito

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 48
Posts: 1,517
Quote:
Originally Posted by Toni Wilen View Post
Fixed, brief extension word scale factor was lost when 68020+ disassembly was recently fixed..
Thanks Toni.
ross is offline  
Old 16 February 2019, 20:54   #43
ross
Sum, ergo Cogito

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 48
Posts: 1,517
Hi Toni, i'm using some memory indirect addressing mode and noticed something strange in disassembler (code is properly executed).
Seems that base register is sometime suppressed (and i'm not suppressing it) or different modes are disassembled in the same way.

So i've manually constructed the problematic encodings:
Code:
	dc.b	$20,$30,$09,%00010000
	dc.b	$20,$30,$09,%01010000
	dc.b	$20,$30,$09,%10010000
	dc.b	$20,$30,$09,%11010000

	dc.b	$20,$30,$09,%00010001
	dc.b	$20,$30,$09,%01010001
	dc.b	$20,$30,$09,%10010001
	dc.b	$20,$30,$09,%11010001

	dc.b	$20,$30,$09,%00010101
	dc.b	$20,$30,$09,%01010101
	dc.b	$20,$30,$09,%10010101
	dc.b	$20,$30,$09,%11010101
That are decoded as:
Code:
005082AE 2030 0910                MOVE.L (A0,D0.L) == $00000000 [00000000],D0
005082B2 2030 0950                MOVE.L (A0) == $00000000 [00000000],D0
005082B6 2030 0990                MOVE.L (D0.L) == $00000000 [00000000],D0
005082BA 2030 09d0                MOVE.L () == $00000000 [00000000],D0
005082BE 2030 0911                MOVE.L ([A0,D0.L]) == $00000000 [00000000],D0
005082C2 2030 0951                MOVE.L ([A0]) == $00000000 [00000000],D0
005082C6 2030 0991                MOVE.L ([D0.L]) == $00000000 [00000000],D0
005082CA 2030 09d1                MOVE.L ([]) == $00000000 [00000000],D0
005082CE 2030 0915                MOVE.L ([],D0.L) == $00000000 [00000000],D0
005082D2 2030 0955                MOVE.L ([]) == $00000000 [00000000],D0
005082D6 2030 0995                MOVE.L ([],D0.L) == $00000000 [00000000],D0
005082DA 2030 09d5                MOVE.L ([]) == $00000000 [00000000],D0
Something wrong here

EDIT: not that all the encodings I entered are wrong, I put only the interested various combinations of bits BS, IS, I/IS using Indirect with Null displacement, in the full format word

Last edited by ross; 16 February 2019 at 21:10.
ross is offline  
Old 17 February 2019, 11:25   #44
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 22,454
I'd say they are technically correct. I don't think those bit combinations are supposed to be used because instruction becomes plain move
Toni Wilen is offline  
Old 17 February 2019, 13:12   #45
ross
Sum, ergo Cogito

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 48
Posts: 1,517
Quote:
Originally Posted by Toni Wilen View Post
I'd say they are technically correct. I don't think those bit combinations are supposed to be used because instruction becomes plain move
Sure for most of them

But take this snippet:
Code:
	lea	$4.w,a0
	moveq	#0,d0
	move.l	a0,$0.w
	dc.b	$2c,$70,$09,%00010101
	dc.b	$2c,$70,$09,%10010101
That disassemble to:
Code:
00642376 41f8 0004                LEA.L $0004,A0
0064237A 7000                     MOVE.L #$00,D0
0064237C 21c8 0000                MOVE.L A0,$0000 [00000004]
00642380 2c70 0915                MOVEA.L ([],D0.L) == $00000004 [002008d4],A6
00642384 2c70 0995                MOVEA.L ([],D0.L) == $00000004 [002008d4],A6
Considering the bits encoding, first move to A6 rightly insert the indirect base content (what is at offset 0 of execbase).
You've execbase in A6 only in the later move, because base is suppressed.
ross is offline  
Old 17 February 2019, 13:18   #46
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 22,454
I think the important question is: how does other disassemblers disassemble them?
Toni Wilen is offline  
Old 17 February 2019, 13:21   #47
ross
Sum, ergo Cogito

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 48
Posts: 1,517
Quote:
Originally Posted by Toni Wilen View Post
I think the important question is: how does other disassemblers disassemble them?
No idea, but surely I would disassemble them like this:

Code:
	dc.b	$2c,$70,$09,%00010101	;movea.l ([a0],d0.l),a6
	dc.b	$2c,$70,$09,%10010101	;movea.l ([],d0.l),a6
I'll try with monam and report.
ross is offline  
Old 17 February 2019, 13:36   #48
ross
Sum, ergo Cogito

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 48
Posts: 1,517
Ok, monam disassemble it right.


---

Just for the record, found a bug in devpac for some 020+ 'unusual/unused' addressing mode:
Code:
	movea.l	([],d0.l),a6
	movea.l ([d0.l]),a6
These two wrongly assemble to same encoding.

But who care, i'm more interested in WinUAE perfection
ross is offline  
Old 22 February 2019, 18:13   #49
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 22,454
Perhaps it works better now but I also didn't test if something else got broken..
Toni Wilen is offline  
Old 22 February 2019, 23:07   #50
ross
Sum, ergo Cogito

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 48
Posts: 1,517
Quote:
Originally Posted by Toni Wilen View Post
Perhaps it works better now but I also didn't test if something else got broken..
Thanks Toni.

If I find something wrong I'll let you know.
ross is offline  
Old 07 March 2019, 00:21   #51
ross
Sum, ergo Cogito

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 48
Posts: 1,517
Hi Toni, found a broken disassembly for CMP2 (recognized as CHK2).
ross is offline  
Old 07 March 2019, 20:04   #52
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 22,454
It is usually very good idea to also include an example..
Toni Wilen is offline  
Old 07 March 2019, 21:03   #53
ross
Sum, ergo Cogito

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 48
Posts: 1,517
Quote:
Originally Posted by Toni Wilen View Post
It is usually very good idea to also include an example..
Code:
	cmp2.w	(a0),a1
	cmp2.b	2(a1),d0
	cmp2.w	($1234.w,a2,d0.l),d2
	cmp2.l	($1234568,a3,d6.w*8),d7
Code:
>d
006860A4 02d0 9000                CHK2.W #$9000,(A0)
006860A8 00e9 0000 0002           CHK2.B #$0000,(A1,$0002) == $0067dbe2
006860AE 02f2 2000 0920 1234      CHK2.W #$2000,($1234,D0.L) == $002127c8
006860B6 04f3 7000 6730 0123 4568 CHK2.L #$7000,($01234568,D6.W*8) == $018ba604
ross is offline  
Old 07 March 2019, 21:23   #54
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 22,454
Better but not good enough, for comparison purposes both instructions should be included

Fixed. This was yet another 68020+ instruction that has "non-standard" encoding. CHK2 and CMP2 has exact same opcode word so they are technically same instruction. Second word has single bit that tells the difference.
Toni Wilen is offline  
Old 07 March 2019, 21:33   #55
ross
Sum, ergo Cogito

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 48
Posts: 1,517
Quote:
Originally Posted by Toni Wilen View Post
Better but not good enough, for comparison purposes both instructions should be included

Fixed. This was yet another 68020+ instruction that has "non-standard" encoding. CHK2 and CMP2 has exact same opcode word so they are technically same instruction. Second word has single bit that tells the difference.
Yes, guessed that the problem was due to the 020 'peculiar' encoding

ross is offline  
Old 08 March 2019, 15:32   #56
Tomislav
Registered User

 
Join Date: Aug 2014
Location: Zagreb / Croatia
Posts: 153
Yes, it's 11th bit of 2nd word.
Code:
FEDCBA9876543210 FEDCBA9876543210
00000ss011<-ea-> Rnnn000000000000    CMP2.[BWL] <ea>,Rn
00000ss011<-ea-> Rnnn100000000000    CHK2.[BWL] <ea>,Rn
ss is size (B/W/L = 00/01/10)
Tomislav 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
Debugger updates (was: WinUAE Debugger HH PC history) selco support.WinUAE 8 14 March 2018 23:27
Debugger doesn't work Dr. MefistO support.WinUAE 16 26 December 2015 22:00
Trapped II - doesn't start John Dough support.Games 1 22 February 2014 13:54
Winuae doesn't want to start sometimes apachacha support.WinUAE 6 01 January 2012 16:20
Remus doesn't start KillaByte support.Apps 36 09 August 2011 17:19

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 06:01.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.08593 seconds with 15 queries