English Amiga Board


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

 
 
Thread Tools
Old 20 September 2016, 14:36   #1
dalton
tulou
 
dalton's Avatar
 
Join Date: Jun 2006
Location: Gothenburg / Sweden
Posts: 88
vasm movem optimization issue?

I get this issue when I compile some code with movem optimaztions enabled. The situation seems to be that a branch transcending the movems gets the wrong destination address after the optimization has been implemented.

This is my code:

Code:
		bra		.foo

		movem.l	(a0),d2/d3
		movem.l	(a1),d4/d5
.foo:
		nop
		nop
		nop
		nop
		nop
After compiling:

Code:
	BRA.S	LAB_039E
	MOVE.L	(A0),D2
	MOVE.L	4(A0),D3
	MOVE.L	(A1),D4
	MOVE.L	4(A1),D5
	NOP
	NOP
	NOP
	NOP
LAB_039E:
	NOP
As you can see, the branch has changed its adress by four rows.

Version info:

vasm 1.7e (c) in 2002-2016 Volker Barthelmann
vasm M68k/CPU32/ColdFire cpu backend 2.1 (c) 2002-2015 Frank Wille
vasm motorola syntax module 3.9a (c) 2002-2016 Frank Wille
vasm test output module 1.0 (c) 2002 Volker Barthelmann
dalton is offline  
Old 22 September 2016, 12:06   #2
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,510
Wow! Yes, thanks a lot! This showed me three different bugs with MOVEM, which I fixed now.
  1. Optimizing/translating to 68020+ addressing modes didn't work so well for MOVEM. For example MOVEM (40000,A0) was not automatically translated into the appropriate 020 addressing mode, but you had to explicitely write (40000.L,A0) instead.
  2. Optimizing MOVEM was not attempted at all, when a register list symbol was used in one operand and a label in the other.
  3. Finally your MOVEM-optimization with two registers for 020+ CPUs, enabled by -opt-movem and -opt-speed.
The patch is too big to post it here. Please use tomorrow's source snapshot.
phx is offline  
Old 23 September 2016, 14:02   #3
dalton
tulou
 
dalton's Avatar
 
Join Date: Jun 2006
Location: Gothenburg / Sweden
Posts: 88
Thanks for investigating so thoroughly!
dalton 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
3D Graphics: possible optimization? sandruzzo Coders. General 3 26 February 2016 08:01
Loop optimization + cycle counts losso Coders. Asm / Hardware 8 05 November 2013 11:50
ARM Assembler Optimization finkel Coders. General 10 01 December 2010 11:56
Movem Pickout Amiga fun issue 06 AliasXZ support.Games 0 12 August 2009 00:32
Something like Movem MarlboroMan Looking for a game name ? 2 10 October 2004 12:47

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

Top

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