This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[patch] to gas for VAX: don't relax BBSSI and BBCCI


Hi there,

Let me take a moment break from m68k relaxation to fix one nit in VAX
relaxation. (Actually, I've recently fixed some somewhat related lame bugs in
the original VAX UNIX tools, and thought I would fix them in the GNU tools as
well while I was at it.) Currently GNU as for VAX tries to relax BBSSI and
BBCCI instructions (as jbssi and jbcci). This is wrong and may in fact be a
trap waiting for someone to fall into it. The BBSSI and BBCCI instructions are
*not* ordinary branches, they are special interlocked synchronisation
instructions defined by the VAX Architecture Reference Manual to have special
semantics for interprocessor synchronisation. These instructions never appear
in any compiler-generated code, as they cannot appear in any normal user code
and are only for special interprocessor synchronisation code hand-written in
compliance with VARM where every instruction counts, and relaxing them defeats
their very purpose. The patch below removes the jbssi and jbcci "relaxable
instructions" from GNU as for VAX. They are currently implemented by turning
BBSSI into BBCCI and vice-versa, which is totally bogus, as BBSSI and BBCCI are
*not* the same except for a different branch sense, so removing them will not
only not break any currently working code, but may even save some poor
programmer hours or days of headscratching over mysteriously broken extremely
complex SMP code.

--
Michael Sokolov		Harhan Engineering Laboratory
Public Service Agent	International Free Computing Task Force
			International Engineering and Science Task Force
			615 N GOOD LATIMER EXPY STE #4
			DALLAS TX 75204-5852 USA

Phone: +1-214-824-7693 (Harhan Eng Lab office)
E-mail: msokolov@ivan.Harhan.ORG (ARPA TCP/SMTP) (UUCP coming soon)

2000-09-15  Michael Sokolov  <msokolov@ivan.Harhan.ORG>

	* config/tc-vax.c (synthetic_votstrs): Remove jbssi and jbcci.
	Likewise in relaxation description comments.

Index: config/tc-vax.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-vax.c,v
retrieving revision 1.6
diff -c -r1.6 tc-vax.c
*** tc-vax.c	2000/09/07 20:28:45	1.6
--- tc-vax.c	2000/09/16 00:24:13
***************
*** 113,120 ****
   bbcs		e3
   bbsc		e4
   bbcc		e5
-  bbssi		e6
-  bbcci		e7
   Always, you complement 0th bit to reverse condition.
   Always, 1-byte opcde, longword-address, byte-address, 1-byte-displacement
  
--- 113,118 ----
***************
*** 1663,1670 ****
    {"jbcs",	{"rlvbb?", 0x800000e3}},
    {"jbsc",	{"rlvbb?", 0x800000e4}},
    {"jbcc",	{"rlvbb?", 0x800000e5}},
-   {"jbssi",	{"rlvbb?", 0x800000e6}},
-   {"jbcci",	{"rlvbb?", 0x800000e7}},
    {"jlbs",	{"rlb?", 0x800000e8}},
    {"jlbc",	{"rlb?", 0x800000e9}},
  
--- 1661,1666 ----

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]