--
--	Inmos Libraries
--	Copyright (C) 1988, 1989, 1990, 1991, 1993  Inmos Limited
--
--	This library is free software; you can redistribute it and/or
--	modify it under the terms of the GNU Lesser General Public
--	License as published by the Free Software Foundation; either
--	version 2 of the License, or (at your option) any later version.
--
--	This library is distributed in the hope that it will be useful,
--	but WITHOUT ANY WARRANTY; without even the implied warranty of
--	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
--	Lesser General Public License for more details.
--
--	You should have received a copy of the GNU Lesser General Public
--	License along with this library; if not, write to the Free Software
--	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
--

--** @module forall

#IF DEFINED(TARGET.HAS.FPU)

--{{{  #options and #comments
#OPTION "E V W"  -- no compiler libs, no vector space, full ASMs
#COMMENT "T8 compiler library, V2.0 01/10/90"
#COMMENT "(c) Copyright INMOS Limited 1988, 1990"
--}}}

#PRAGMA TRANSLATE INT16XOR "INT16XOR%CHK"

--{{{  INT16XOR -- TA & T8
-- old code ( V1.1 21/02/89 ):
--INT16 FUNCTION INT16XOR (VAL INT16 A, VAL INT16 B) IS INT16 ((INT A) >< (INT B)) :

INT16 FUNCTION INT16XOR (VAL INT16 A, B)

  --{{{  history
  -- Integer Arithmetic (26sep86) --- DES
  -- Converted to functions 26jan87 --- PWT
  -- Converted to use ASM for speed - see SW-0064 "occam Run-time Model
  -- Specification" for the validity of the following assumptions:
  -- INT16s on 32-bit transputers are held in lowest two bytes of word;
  -- the upper two bytes of a word containing an INT16 are undefined.
  -- TS/0723; V2.0; 1 Oct 90  SRH
  --}}}

  VALOF
    ASM
      LDAB B, A
      XOR             -- upper two bytes are irrelevant
      AJW .WSSIZE
      RET             -- leave result in Areg, upper two bytes are irrelevant
    RESULT 0( INT16 ) -- dummy
:
--}}}

#ENDIF
