From 1eb8d8a1947f2db86a1dc4d627e357fe729f9a41 Mon Sep 17 00:00:00 2001
From: Ben Avison <bavison@gitlab.riscosopen.org>
Date: Tue, 16 Jun 2009 00:41:57 +0000
Subject: [PATCH] Build fix

Detail:
  Defines UXTH and SXTH as macros. This means we can assemble the output of
  cc -S -cpu 6 even using current versions of objasm that are limited to the
  v5TEJ instruction set. It is expected that objasm will ignore these macros
  if/when it gains v6 instruction set support.
Admin:
  Tested - it works.
---
 Sources/SprExtend | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/Sources/SprExtend b/Sources/SprExtend
index 6fa6fb7..cfa9469 100644
--- a/Sources/SprExtend
+++ b/Sources/SprExtend
@@ -402,6 +402,19 @@ file    SETL    {FALSE}
 nbuffers * 8                            ; number of code buffers to use
         ]
 
+        ; Enable use of cc -cpu 6 with an old version of objasm
+        ; If your objasm understands v6 opcodes, it will ignore these macros
+        ; Note the 3rd parameter is not implemented yet (not currently needed)
+        MACRO
+$lab    SXTH    $rd,$rm
+$lab    DCI     &E6BF0070 :OR: ($rd :SHL: 12) :OR: $rm
+        MEND
+
+        MACRO
+$lab    UXTH    $rd,$rm
+$lab    DCI     &E6FF0070 :OR: ($rd :SHL: 12) :OR: $rm
+        MEND
+
 ; ----------------------------------------------------------------------------
 
         ASSERT  (.=Module_BaseAddr)
-- 
GitLab