English Amiga Board


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

 
 
Thread Tools
Old 16 October 2014, 10:32   #41
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 44
Posts: 2,459
It's a matter of decision. It may be very useful if you wanted a signed datatype, and come in the way if what you wanted is unsigned.
meynaf is offline  
AdSense AdSense  
Old 17 October 2014, 04:16   #42
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 1,736
Quote:
Originally Posted by phx View Post
Hmm... my personal tendency is to regard that as a bug. ... I'll fix that.
Hi phx,

if you want to release an update for the good old PhxAss anyway, I would like to ask you for two additional new features:

1.) Could you make it possible to determine the command line options which were set for the CPU and FPU by reading out these settings at compilation time somehow?

2.) It would be nice if I could disable/enable the optimization for certain code sequences instead of using DC.W instructions.

Thanks a lot for this excellent PhxAss!
PeterK is offline  
Old 18 October 2014, 20:33   #43
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,019
Quote:
Originally Posted by PeterK View Post
if you want to release an update for the good old PhxAss anyway,
I have no concrete plans for a release at the moment. But maybe I should do it, as there are indeed a few improvements since the last official release (was it 4.44?).
The current beta version is available here.

Quote:
I would like to ask you for two additional new features:
PhxAss has reached end-of-life. If at all, I will only do bug fixing.


Quote:
1.) Could you make it possible to determine the command line options which were set for the CPU and FPU by reading out these settings at compilation time somehow?
I don't understand what you mean. The current CPU/FPU setting from the command line, or an appropriate directive, are reflected by the __CPU and __FPU symbols.

Quote:
2.) It would be nice if I could disable/enable the optimization for certain code sequences instead of using DC.W instructions.
You can enable/disable any optimzation mode with the OPT directive, e.g. "OPT 0" (no optimizations) and "OPT 1" (standard optimizations).

Last edited by phx; 18 October 2014 at 20:35. Reason: fixed URL
phx is offline  
Old 18 October 2014, 21:12   #44
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 49
Posts: 918
If you are looking for more PhxAss bugs, then here is next:

Code:
 opt off
 move.l #5,D1
 opt on
 rts
Move.l is replaced with moveq and this is bug due optimisation is/must be
disabled for this part of code.
Don_Adan is offline  
Old 19 October 2014, 00:57   #45
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 1,736
Quote:
Originally Posted by phx View Post
The current CPU/FPU setting from the command line, or an appropriate directive, are reflected by the __CPU and __FPU symbols.
Ok thank you, that works indeed !
There is no information in PhxAss.guide that these Set Symbols are reflecting the command line options, too. Or I've overseen it somewhere.
Quote:
You can enable/disable any optimzation mode with the OPT directive, e.g. "OPT 0" (no optimizations) and "OPT 1" (standard optimizations).
The OPT 0 or OPTC 0 directive doesn't work for me when the command line options have optimization enabled. The following example is always optimized to use BRA:
Code:
 OPT 0
 JMP RelocatedLabel
 
RelocatedLabel
 RTS
PeterK is offline  
Old 19 October 2014, 12:13   #46
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,019
Quote:
Originally Posted by Don_Adan View Post
If you are looking for more PhxAss bugs
Certainly not!

Quote:
Move.l is replaced with moveq and this is bug due optimisation is/must be
disabled for this part of code.
Works here. Perhaps you have specified an optimization on the command line, as PeterK mentioned?
phx is offline  
Old 19 October 2014, 12:15   #47
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,019
Quote:
Originally Posted by PeterK View Post
The OPT 0 or OPTC 0 directive doesn't work for me when the command line options have optimization enabled.
That's true. And this is done intentionally by PhxAss. The optimization flags on the command line will always override every OPT directive in the source.

Of course that could be changed. But I doubt it would be a good idea after so many years.
phx is offline  
Old 19 October 2014, 14:43   #48
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 49
Posts: 918
Quote:
Originally Posted by phx View Post
Certainly not!

Works here. Perhaps you have specified an optimization on the command line, as PeterK mentioned?
Sometimes some code can't be optimised, f.e. branches like bra.w or jmp to address, but PhxAss always optimised full of code. Of course I can disable optimisation via OPT 0, but I want to disable optimisation only for some parts of code, not for all code. I typed:

Phxass example.asm

and example code was optimised to moveq. I found this problem when I assembled code like jmp $address, when $address was label in the code, it was always replaced jmp with bra.w (if I remember right).
Don_Adan is offline  
Old 20 October 2014, 10:22   #49
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 44
Posts: 2,459
PhxAss optimizations on/off always work correctly for me.
Simple, just have a PHXOPTS file with optimization turned on, and use OPT 0 in the source where needed. Don't use any opt in the command line.
I have to see an example where this fails.
meynaf is offline  
Old 30 December 2014, 09:50   #50
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 1,736
Possible PhxAss bug with DIV*.L and MUL*.L. PhxAss 4.46 seems to delete the last 3 bits of the command, setting the Dr-register always to zero. See Diff.txt. PhxAss 4.44 works correct.

From Motorola M68000 Family ProgRefManual:
Quote:
Register Dr field—After the division, this register contains the 32-bit remainder. If Dr
and Dq are the same register, only the quotient is returned. If the size field is 1,
this field also specifies the data register that contains the high-order 32 bits of the
dividend.
For all instructions in my example Diff.txt the input bits for Dr and Dq were always identical (the same register). Thus, the instructions generated by ADis should be correct. But PhxAss is not generating the original hex code again, trashing D0 !!
Attached Files
File Type: txt Diff.txt (785 Bytes, 76 views)

Last edited by PeterK; 30 December 2014 at 10:59.
PeterK is offline  
Old 30 December 2014, 23:31   #51
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,019
Quote:
Originally Posted by PeterK View Post
Possible PhxAss bug with DIV*.L and MUL*.L. PhxAss 4.46 seems to delete the last 3 bits of the command, setting the Dr-register always to zero. See Diff.txt. PhxAss 4.44 works correct.
*Cough*
I must have been mentally deranged when I decided to "fix" that in 4.45, more than 8 years ago. You're right of course. Dr==Dq is important to differentiate a DIVx.L <ea>,Dq from DIVx.L <ea>,Dr: Dq (same for MULx.L).

Fortunatelly 4.46 was never officially released, so I just fixed it and updated the latest beta version here: http://sun.hasenbraten.de/~frank/TEST/PhxAss446.lha
phx is offline  
Old 30 December 2014, 23:52   #52
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 1,736
No, never mind, it was not a real problem for me yet, because in my icon.library I use only MUL*.W and DIV*.W. But I found this bug already some years ago when Cosmos sent me a copy of 4.45. At that time I turned back to 4.44 again.

Now, I discovered this forgotten problem again with 4.46 when I tried to reassemble a library. I always do that after disassembling something to ensure that I can reproduce a 100 % identical binary again before I start with any modifications and improvements.

Thank you for the fast fix! (And I can't live without PhxAss)
PeterK 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
How compile WinUAE... WCoder support.WinUAE 57 17 April 2014 18:42
Trying to compile some ASM in StormC V4 NovaCoder Coders. General 2 29 September 2009 02:44
GFA compile xc8 Coders. General 31 19 May 2009 19:21
PhxAss 4.42 AmiGer Coders. General 1 15 October 2004 09:07
Compile WinUAE ????? Myriel support.WinUAE 14 10 January 2004 18:06

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 11:45.


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