English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 16 August 2010, 11:22   #1
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
vasm 1.5 RFC

Soon I would like to bump the version of vasm (http://sun.hasenbraten.de/vasm/) to V1.5 and I would like to do my best to make it as stable and useful as possible.
So when anybody has a problem with V1.4f or the daily source snapshot, please tell me now. I'm also open for new features, as long as their complexity doesn't destabilize the current version.
phx is offline  
Old 16 August 2010, 13:02   #2
Cosmos
Banned
 
Join Date: Jan 2007
Location: France
Posts: 655
Two new mnemonics :

bra2.b Label+2 => for $0C40

bra4.b Label+4 => for $51FA


Please Frank, we don't like some 'dc.w $0C40' in the sources...
Cosmos is offline  
Old 16 August 2010, 15:56   #3
SyX
Registered User
 
Join Date: Sep 2004
Location: Brasil
Age: 49
Posts: 181
Quote:
Originally Posted by Cosmos View Post
Two new mnemonics :

bra2.b Label+2 => for $0C40

bra4.b Label+4 => for $51FA


Please Frank, we don't like some 'dc.w $0C40' in the sources...
In this case, i think that it would better to use a pair of macros or i don't understand at Cosmos.

Last edited by SyX; 16 August 2010 at 16:02.
SyX is offline  
Old 16 August 2010, 15:58   #4
Cosmos
Banned
 
Join Date: Jan 2007
Location: France
Posts: 655
>macros

Too much complicated !
Cosmos is offline  
Old 16 August 2010, 16:43   #5
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
I have to agree with Lionheart that it doesn't make much sense. It just makes your source incompatible with any other assembler.

But if you really want that, you can insert the following line into cpus/m68k/opcodes.h:
Code:
  "bra2",     {0},          {{0},              {0x0c40,0},1|UNS|S_NONE,m68000up|mcf},
The name is also bad. I think something like "skip" would be better. And the label field is not really required.
phx is offline  
Old 16 August 2010, 16:54   #6
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by Cosmos View Post
>macros

Too much complicated !
Code:
bra2	MACRO
	dc.w    $0c40 ; cmp.w #xx,d0
        ENDM
What's complicated about that?
StingRay is offline  
Old 18 August 2010, 02:39   #7
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Just cosmetic details, but some flexibility in the if-directives would be nice, so you could f.ex eliminate the .size in:

Code:
       cnop   0, 4
Start  ...
       ...
       rts

.size  = *-Start 
       if     .size > 256
        fail  "code will not fit in cache"
       endif
Also, complementing the comment directive with a comments-endcomments pair for multiple lines would be great.
Leffmann is offline  
Old 18 August 2010, 16:59   #8
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by Leffmann View Post
Just cosmetic details, but some flexibility in the if-directives would be nice, so you could f.ex eliminate the .size in:

Code:
       cnop   0, 4
Start  ...
       ...
       rts

.size  = *-Start 
       if     .size > 256
        fail  "code will not fit in cache"
       endif
Ok, done. That was a bug. There must be no difference between .size and *-Start.
Be aware that such kind of code is dangerous. Directives for conditional assembly have to evaluate in the first pass and changes in further passes will not be recognized (e.g. through optimizations).

Quote:
Also, complementing the comment directive with a comments-endcomments pair for multiple lines would be great.
That would need more than a minute to implement, but could be done. Should I use the REM and EREM directives from AsmOne?
phx is offline  
Old 19 August 2010, 12:52   #9
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Quote:
Originally Posted by phx View Post
Be aware that such kind of code is dangerous. Directives for conditional assembly have to evaluate in the first pass and changes in further passes will not be recognized (e.g. through optimizations).
Yeah I see now how ASM-One's if2 directive is useful for these things.

Any keywords for multiple comments would be fine, up to you, but I think it's important that they're available at all times, so you don't have to set f.ex an ASM-One compatibility mode.
Leffmann is offline  
Old 20 August 2010, 13:46   #10
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by Leffmann View Post
Any keywords for multiple comments would be fine, up to you, but I think it's important that they're available at all times, so you don't have to set f.ex an ASM-One compatibility mode.
Ok, done. I used REM and EREM.

BTW, the same effect can be reached by using REPT 0, which might be more portable. But I didn't test if all assemblers accept a 0 counter.
phx is offline  
Old 01 September 2010, 23:10   #11
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Another cosmetic detail, I noticed that f.ex blk.l 10, label is not valid, and you have to use a larger rept-dc.l-endr construct to work around it.
Leffmann is offline  
Old 01 September 2010, 23:38   #12
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by Leffmann View Post
Another cosmetic detail, I noticed that f.ex blk.l 10, label is not valid, and you have to use a larger rept-dc.l-endr construct to work around it.
I don't use vasm but, did you try dcb.l instead of blk (which is, as far as I know, Seka (and Asm1 for obvious reasons) only)?
StingRay is offline  
Old 03 September 2010, 11:52   #13
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by Leffmann View Post
Another cosmetic detail, I noticed that f.ex blk.l 10, label is not valid, and you have to use a larger rept-dc.l-endr construct to work around it.
DCB and BLK belong to the same family as DS. They reserve memory space and optionally fill it with a pattern. Internally they are represented by a "space"-atom, which was not meant to carry relocations.

Is that really needed? Ok. I enhanced the space atom to support relocations.
phx is offline  
Old 03 September 2010, 18:57   #14
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Quote:
Originally Posted by phx View Post
Is that really needed? Ok. I enhanced the space atom to support relocations.
Maybe not needed but the reason I use vasm is that it's the most powerful, flexible and convenient to use assembler, so I'll usually suggest these things if I think they can make vasm even better, and I think it's great that you're so accommodating.
Leffmann is offline  
Old 04 September 2010, 14:53   #15
SyX
Registered User
 
Join Date: Sep 2004
Location: Brasil
Age: 49
Posts: 181
Quote:
Originally Posted by Leffmann View Post
Maybe not needed but the reason I use vasm is that it's the most powerful, flexible and convenient to use assembler, so I'll usually suggest these things if I think they can make vasm even better, and I think it's great that you're so accommodating.
Totally Agreed!!! Besides, Frank is a GREAT GUY!!!
SyX is offline  
Old 19 September 2010, 07:49   #16
Cosmos
Banned
 
Join Date: Jan 2007
Location: France
Posts: 655
Other very usefull idea :

hunk organisation = begin with the first... and the last

Let's user choose with an option, like -hunkorder...


Cosmos is offline  
Old 01 November 2010, 08:21   #17
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
VAsm v1.3c does not support such constructions even in phxass compatibility mode :
Code:
 basereg mybss,a5

 lea myvar(a5),a0

 bss
mybss
myvar ds.l 1
PhxAss did support that. On vasm (1.3c, did not test 1.4) it requires mybss to be declared prior to the basereg and it is very bad for me.
meynaf is offline  
Old 02 November 2010, 12:41   #18
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
BASEREG and ENDB were not supported before V1.4. So I don't know how you got it to accept basereg at all with 1.3c?

When there are no more bug reports in the following days I will probably release V1.5 soon. The daily snapshot can always be tested from: http://sun.hasenbraten.de/vasm/index.php?view=source
phx is offline  
Old 02 November 2010, 16:07   #19
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Not sure if this is a bug or a user error, but whenever I use -devpac to turn all optimizations off and specify opt o1+ to enable branch optimizations only, it also optimizes move #0 to clr, and add to addq.

What I want is to disable all optimizations except branches without explicit size. Is this possible?
Leffmann is offline  
Old 03 November 2010, 16:08   #20
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by Leffmann View Post
Not sure if this is a bug or a user error, but whenever I use -devpac to turn all optimizations off and specify opt o1+ to enable branch optimizations only, it also optimizes move #0 to clr, and add to addq.
That's because vasm has no optimization flags for most 'safe' optimizations. They are always enabled as soon as the no-opt flag is cleared.

move #0 to clr is not a safe optimization for the 68000, BTW. So I assume you were generating code for 68010+?

Quote:
What I want is to disable all optimizations except branches without explicit size. Is this possible?
Not with pre-1.5 versions. I'm currently working on a solution and notify this thread when it is available. The massive changes require some more testing though, which will delay the release...
phx 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
EAB Linux RFC gilgamesh request.Other 16 25 April 2014 04:19
vasm and word alignment Den Coders. Asm / Hardware 9 07 February 2014 11:25
Help linking VASM object code clenched Coders. Asm / Hardware 2 24 May 2013 22:32
vasm fsincos dalton Coders. Asm / Hardware 4 03 September 2012 10:35
RFC: SPS/CAPS @ back2roots ? hippie2000 project.SPS (was CAPS) 29 06 November 2007 23:25

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 16:48.

Top

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