Subject: port-sparc/3287: as(1) doesn't understand some iflush operands
To: None <gnats-bugs@gnats.netbsd.org>
From: Michael Eriksson T/D <Michael.Eriksson@era-t.ericsson.se>
List: netbsd-bugs
Date: 03/04/1997 11:56:48
>Number:         3287
>Category:       port-sparc
>Synopsis:       as(1) doesn't understand some iflush operands
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar  4 03:05:00 1997
>Last-Modified:
>Originator:     Michael Eriksson
>Organization:
Ericsson Radio Systems AB
>Release:        1.2
>Environment:
NetBSD/sparc 1.2.
>Description:

as(1) does not understand all (correct) forms of operands for the
iflush instruction. Specifically, it doesn't understand just a
register, without offset, as operand.

This is currently (if I'm not mistaken) what's hindering the free Java
VM kaffe to work in JIT mode on NetBSD/sparc. I'm about to send a fix
(to use "+0" offset) to the kaffe developer, Tim Wilkinson, but I
think it should be fixed in NetBSD as well. In the long run, The Right
Thing is, as others have noted, to merge our as with Gnu's...

>How-To-Repeat:

abro>cat iflush.s
        iflush %o1
abro>as iflush.s
iflush.s: Assembler messages:
iflush.s:1: Error: Illegal operands
abro>cat iflush2.s
        iflush %o1+0
abro>as iflush2.s
abro>

>Fix:

*** gnu/usr.bin/gas/opcode/sparc.h.orig	Fri Feb  4 00:30:09 1994
--- gnu/usr.bin/gas/opcode/sparc.h	Tue Mar  4 11:41:31 1997
***************
*** 777,782 ****
--- 777,783 ----
  { "unimp",	F2(0x0, 0x0), 0xffc00000, "n", 0, v6 },
  
  { "iflush",	F3(2, 0x3b, 0), F3(~2, ~0x3b, ~0)|ASI(~0),	"1+2", 0, v6 },
+ { "iflush",	F3(2, 0x3b, 1), F3(~2, ~0x3b, ~1)|SIMM13(~0),	"1", 0, v6 },
  { "iflush",	F3(2, 0x3b, 1), F3(~2, ~0x3b, ~1),		"1+i", 0, v6 },
  { "iflush",	F3(2, 0x3b, 1), F3(~2, ~0x3b, ~1),		"i+1", 0, v6 },
  { "iflush",	F3(2, 0x3b, 1), F3(~2, ~0x3b, ~1)|RS1_G0,	"i", 0, v6 },
>Audit-Trail:
>Unformatted: