diff options
author | gibbs <gibbs@FreeBSD.org> | 2002-09-26 21:46:19 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 2002-09-26 21:46:19 +0000 |
commit | 2d71e778068d83b53ae92f61bfc925060a282032 (patch) | |
tree | 11ece05ef6f5beabd35ea69bfaa0350e63979453 /sys/dev/aic7xxx | |
parent | b8492c6de792297f1174b6b68f96979361124640 (diff) | |
download | FreeBSD-src-2d71e778068d83b53ae92f61bfc925060a282032.zip FreeBSD-src-2d71e778068d83b53ae92f61bfc925060a282032.tar.gz |
Use inttypes.h
Upgrade assembler to allow a move immediate of 0.
This is helpful in certain macros where we can't know the value of the
immediate in advance.
Diffstat (limited to 'sys/dev/aic7xxx')
-rw-r--r-- | sys/dev/aic7xxx/aicasm/Makefile | 2 | ||||
-rw-r--r-- | sys/dev/aic7xxx/aicasm/aicasm_gram.y | 22 | ||||
-rw-r--r-- | sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l | 3 | ||||
-rw-r--r-- | sys/dev/aic7xxx/aicasm/aicasm_scan.l | 3 | ||||
-rw-r--r-- | sys/dev/aic7xxx/aicasm/aicasm_symbol.c | 3 |
5 files changed, 26 insertions, 7 deletions
diff --git a/sys/dev/aic7xxx/aicasm/Makefile b/sys/dev/aic7xxx/aicasm/Makefile index 8d9a9af..fe222fe 100644 --- a/sys/dev/aic7xxx/aicasm/Makefile +++ b/sys/dev/aic7xxx/aicasm/Makefile @@ -1,4 +1,4 @@ -# $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aicasm/Makefile#1 $ +# $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aicasm/Makefile#2 $ # # $FreeBSD$ diff --git a/sys/dev/aic7xxx/aicasm/aicasm_gram.y b/sys/dev/aic7xxx/aicasm/aicasm_gram.y index d6ba993..0d2ff3e 100644 --- a/sys/dev/aic7xxx/aicasm/aicasm_gram.y +++ b/sys/dev/aic7xxx/aicasm/aicasm_gram.y @@ -38,11 +38,12 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_gram.y#21 $ + * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_gram.y#24 $ * * $FreeBSD$ */ +#include <inttypes.h> #include <sys/types.h> #include <inttypes.h> @@ -937,6 +938,8 @@ immediate_or_a: | T_A { SLIST_INIT(&$$.referenced_syms); + symlist_add(&$$.referenced_syms, accumulator.symbol, + SYMLIST_INSERT_HEAD); $$.value = 0; } ; @@ -1236,9 +1239,22 @@ code: ; code: - T_MVI destination ',' immediate_or_a ret ';' + T_MVI destination ',' immediate ret ';' { - format_1_instr(AIC_OP_OR, &$2, &$4, &allzeros, $5); + if ($4.value == 0 + && is_download_const(&$4) == 0) { + expression_t immed; + + /* + * Allow move immediates of 0 so that macros, + * that can't know the immediate's value and + * otherwise compensate, still work. + */ + make_expression(&immed, 0xff); + format_1_instr(AIC_OP_AND, &$2, &immed, &allzeros, $5); + } else { + format_1_instr(AIC_OP_OR, &$2, &$4, &allzeros, $5); + } } ; diff --git a/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l b/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l index 112febf..a5bd7f0 100644 --- a/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l +++ b/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l @@ -38,11 +38,12 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_macro_scan.l#4 $ + * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_macro_scan.l#6 $ * * $FreeBSD$ */ +#include <inttypes.h> #include <sys/types.h> #include <limits.h> diff --git a/sys/dev/aic7xxx/aicasm/aicasm_scan.l b/sys/dev/aic7xxx/aicasm/aicasm_scan.l index 14a7458..11828f2 100644 --- a/sys/dev/aic7xxx/aicasm/aicasm_scan.l +++ b/sys/dev/aic7xxx/aicasm/aicasm_scan.l @@ -38,11 +38,12 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_scan.l#16 $ + * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_scan.l#17 $ * * $FreeBSD$ */ +#include <inttypes.h> #include <sys/types.h> #include <limits.h> diff --git a/sys/dev/aic7xxx/aicasm/aicasm_symbol.c b/sys/dev/aic7xxx/aicasm/aicasm_symbol.c index db84696..1915537 100644 --- a/sys/dev/aic7xxx/aicasm/aicasm_symbol.c +++ b/sys/dev/aic7xxx/aicasm/aicasm_symbol.c @@ -37,11 +37,12 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_symbol.c#21 $ + * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_symbol.c#22 $ * * $FreeBSD$ */ +#include <inttypes.h> #include <sys/types.h> #ifdef __linux__ |