diff options
Diffstat (limited to 'gas')
55 files changed, 0 insertions, 2676 deletions
diff --git a/gas/Makefile.am b/gas/Makefile.am index 7159be5..bd59739 100644 --- a/gas/Makefile.am +++ b/gas/Makefile.am @@ -200,7 +200,6 @@ TARGET_CPU_CFILES = \ config/tc-visium.c \ config/tc-wasm32.c \ config/tc-xstormy16.c \ - config/tc-xc16x.c \ config/tc-xgate.c \ config/tc-xtensa.c \ config/tc-z80.c \ @@ -274,7 +273,6 @@ TARGET_CPU_HFILES = \ config/tc-visium.h \ config/tc-wasm32.h \ config/tc-xstormy16.h \ - config/tc-xc16x.h \ config/tc-xgate.h \ config/tc-xtensa.h \ config/tc-z80.h \ diff --git a/gas/Makefile.in b/gas/Makefile.in index 67dac53..c57d78f 100644 --- a/gas/Makefile.in +++ b/gas/Makefile.in @@ -678,7 +678,6 @@ TARGET_CPU_CFILES = \ config/tc-visium.c \ config/tc-wasm32.c \ config/tc-xstormy16.c \ - config/tc-xc16x.c \ config/tc-xgate.c \ config/tc-xtensa.c \ config/tc-z80.c \ @@ -752,7 +751,6 @@ TARGET_CPU_HFILES = \ config/tc-visium.h \ config/tc-wasm32.h \ config/tc-xstormy16.h \ - config/tc-xc16x.h \ config/tc-xgate.h \ config/tc-xtensa.h \ config/tc-z80.h \ @@ -1203,8 +1201,6 @@ config/tc-wasm32.$(OBJEXT): config/$(am__dirstamp) \ config/$(DEPDIR)/$(am__dirstamp) config/tc-xstormy16.$(OBJEXT): config/$(am__dirstamp) \ config/$(DEPDIR)/$(am__dirstamp) -config/tc-xc16x.$(OBJEXT): config/$(am__dirstamp) \ - config/$(DEPDIR)/$(am__dirstamp) config/tc-xgate.$(OBJEXT): config/$(am__dirstamp) \ config/$(DEPDIR)/$(am__dirstamp) config/tc-xtensa.$(OBJEXT): config/$(am__dirstamp) \ @@ -1410,7 +1406,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/tc-vax.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/tc-visium.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/tc-wasm32.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/tc-xc16x.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/tc-xgate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/tc-xstormy16.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/tc-xtensa.Po@am__quote@ diff --git a/gas/config/tc-xc16x.c b/gas/config/tc-xc16x.c deleted file mode 100644 index c6cca59..0000000 --- a/gas/config/tc-xc16x.c +++ /dev/null @@ -1,350 +0,0 @@ -/* tc-xc16x.c -- Assembler for the Infineon XC16X. - Copyright (C) 2006-2022 Free Software Foundation, Inc. - Contributed by KPIT Cummins Infosystems - - This file is part of GAS, the GNU Assembler. - - GAS is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - GAS 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GAS; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA - 02110-1301, USA. */ - - -#include "as.h" -#include "safe-ctype.h" -#include "subsegs.h" -#include "symcat.h" -#include "opcodes/xc16x-desc.h" -#include "opcodes/xc16x-opc.h" -#include "cgen.h" -#include "dwarf2dbg.h" - - -#ifdef OBJ_ELF -#include "elf/xc16x.h" -#endif - -/* Structure to hold all of the different components describing - an individual instruction. */ -typedef struct -{ - const CGEN_INSN * insn; - const CGEN_INSN * orig_insn; - CGEN_FIELDS fields; -#if CGEN_INT_INSN_P - CGEN_INSN_INT buffer [1]; -#define INSN_VALUE(buf) (*(buf)) -#else - unsigned char buffer [CGEN_MAX_INSN_SIZE]; -#define INSN_VALUE(buf) (buf) -#endif - char * addr; - fragS * frag; - int num_fixups; - fixS * fixups [GAS_CGEN_MAX_FIXUPS]; - int indices [MAX_OPERAND_INSTANCES]; -} -xc16x_insn; - -const char comment_chars[] = ";"; -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = ""; -const char EXP_CHARS[] = "eE"; -const char FLT_CHARS[] = "dD"; - -#define XC16X_SHORTOPTS "" -const char * md_shortopts = XC16X_SHORTOPTS; - -struct option md_longopts[] = -{ - {NULL, no_argument, NULL, 0} -}; -size_t md_longopts_size = sizeof (md_longopts); - -static void -xc16xlmode (int arg ATTRIBUTE_UNUSED) -{ - if (stdoutput != NULL) - if (!bfd_set_arch_mach (stdoutput, bfd_arch_xc16x, bfd_mach_xc16xl)) - as_warn (_("could not set architecture and machine")); -} - -static void -xc16xsmode (int arg ATTRIBUTE_UNUSED) -{ - if (!bfd_set_arch_mach (stdoutput, bfd_arch_xc16x, bfd_mach_xc16xs)) - as_warn (_("could not set architecture and machine")); -} - -static void -xc16xmode (int arg ATTRIBUTE_UNUSED) -{ - if (!bfd_set_arch_mach (stdoutput, bfd_arch_xc16x, bfd_mach_xc16x)) - as_warn (_("could not set architecture and machine")); -} - -/* The target specific pseudo-ops which we support. */ -const pseudo_typeS md_pseudo_table[] = -{ - { "word", cons, 2 }, - {"xc16xl", xc16xlmode, 0}, - {"xc16xs", xc16xsmode, 0}, - {"xc16x", xc16xmode, 0}, - { NULL, NULL, 0 } -}; - -void -md_begin (void) -{ - /* Initialize the `cgen' interface. */ - - /* Set the machine number and endian. */ - gas_cgen_cpu_desc = xc16x_cgen_cpu_open (CGEN_CPU_OPEN_MACHS, 0, - CGEN_CPU_OPEN_ENDIAN, - CGEN_ENDIAN_LITTLE, - CGEN_CPU_OPEN_END); - xc16x_cgen_init_asm (gas_cgen_cpu_desc); - - /* This is a callback from cgen to gas to parse operands. */ - cgen_set_parse_operand_fn (gas_cgen_cpu_desc, gas_cgen_parse_operand); -} - -void -md_assemble (char *str) -{ - xc16x_insn insn; - char *errmsg; - - /* Initialize GAS's cgen interface for a new instruction. */ - gas_cgen_init_parse (); - - insn.insn = xc16x_cgen_assemble_insn - (gas_cgen_cpu_desc, str, & insn.fields, insn.buffer, & errmsg); - - if (!insn.insn) - { - as_bad ("%s", errmsg); - return; - } - - /* Doesn't really matter what we pass for RELAX_P here. */ - gas_cgen_finish_insn (insn.insn, insn.buffer, - CGEN_FIELDS_BITSIZE (& insn.fields), 1, NULL); -} - -/* Return the bfd reloc type for OPERAND of INSN at fixup FIXP. - Returns BFD_RELOC_NONE if no reloc type can be found. - *FIXP may be modified if desired. */ - -bfd_reloc_code_real_type -md_cgen_lookup_reloc (const CGEN_INSN *insn ATTRIBUTE_UNUSED, - const CGEN_OPERAND *operand, - fixS *fixP) -{ - switch (operand->type) - { - case XC16X_OPERAND_REL: - /* ??? Adjust size? */ - fixP->fx_where += 1; - fixP->fx_pcrel = 1; - return BFD_RELOC_8_PCREL; - - case XC16X_OPERAND_CADDR: - fixP->fx_size = 2; - fixP->fx_where += 2; - return BFD_RELOC_16; - - case XC16X_OPERAND_UIMM7: - /* ??? Adjust size? */ - fixP->fx_where += 1; - fixP->fx_pcrel = 1; - return BFD_RELOC_8_PCREL; - - case XC16X_OPERAND_UIMM16: - case XC16X_OPERAND_MEMORY: - fixP->fx_size = 2; - fixP->fx_where += 2; - return BFD_RELOC_16; - - case XC16X_OPERAND_UPOF16: - fixP->fx_size = 2; - fixP->fx_where += 2; - return BFD_RELOC_XC16X_POF; - - case XC16X_OPERAND_UPAG16: - fixP->fx_size = 2; - fixP->fx_where += 2; - return BFD_RELOC_XC16X_PAG; - - case XC16X_OPERAND_USEG8: - /* ??? This is an 8 bit field, why the 16 bit reloc? */ - fixP->fx_where += 1; - return BFD_RELOC_XC16X_SEG; - - case XC16X_OPERAND_USEG16: - case XC16X_OPERAND_USOF16: - fixP->fx_size = 2; - fixP->fx_where += 2; - return BFD_RELOC_XC16X_SOF; - - default : /* Avoid -Wall warning. */ - break; - } - - return BFD_RELOC_NONE; -} - -/* Write a value out to the object file, using the appropriate endianness. */ - -void -md_number_to_chars (char * buf, valueT val, int n) -{ - number_to_chars_littleendian (buf, val, n); -} - -void -md_show_usage (FILE * stream) -{ - fprintf (stream, _(" XC16X specific command line options:\n")); -} - -int -md_parse_option (int c ATTRIBUTE_UNUSED, - const char *arg ATTRIBUTE_UNUSED) -{ - return 0; -} - -const char * -md_atof (int type, char *litP, int *sizeP) -{ - return ieee_md_atof (type, litP, sizeP, false); -} - -valueT -md_section_align (segT segment, valueT size) -{ - int align = bfd_section_alignment (segment); - return ((size + (1 << align) - 1) & -(1 << align)); -} - -symbolS * -md_undefined_symbol (char *name ATTRIBUTE_UNUSED) -{ - return NULL; -} - -int -md_estimate_size_before_relax (fragS *fragP ATTRIBUTE_UNUSED, - segT segment_type ATTRIBUTE_UNUSED) -{ - printf (_("call to md_estimate_size_before_relax \n")); - abort (); -} - - -long -md_pcrel_from (fixS *fixP) -{ - long temp_val; - temp_val=fixP->fx_size + fixP->fx_where + fixP->fx_frag->fr_address; - - return temp_val; -} - -long -md_pcrel_from_section (fixS *fixP, segT sec) -{ - if (fixP->fx_addsy != (symbolS *) NULL - && (! S_IS_DEFINED (fixP->fx_addsy) - || S_GET_SEGMENT (fixP->fx_addsy) != sec - || S_IS_EXTERNAL (fixP->fx_addsy) - || S_IS_WEAK (fixP->fx_addsy))) - { - return 0; - } - - return md_pcrel_from (fixP); -} - -arelent * -tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp) -{ - arelent *rel; - bfd_reloc_code_real_type r_type; - - if (fixp->fx_subsy) - { - if ((S_GET_SEGMENT (fixp->fx_addsy) != S_GET_SEGMENT (fixp->fx_subsy)) - || S_GET_SEGMENT (fixp->fx_addsy) == undefined_section) - { - as_bad_subtract (fixp); - return NULL; - } - } - - rel = XNEW (arelent); - rel->sym_ptr_ptr = XNEW (asymbol *); - *rel->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy); - rel->address = fixp->fx_frag->fr_address + fixp->fx_where; - rel->addend = fixp->fx_offset; - - r_type = fixp->fx_r_type; - -#define DEBUG 0 -#if DEBUG - fprintf (stderr, "%s\n", bfd_get_reloc_code_name (r_type)); - fflush (stderr); -#endif - - rel->howto = bfd_reloc_type_lookup (stdoutput, r_type); - if (rel->howto == NULL) - { - as_bad_where (fixp->fx_file, fixp->fx_line, - _("Cannot represent relocation type %s"), - bfd_get_reloc_code_name (r_type)); - return NULL; - } - - return rel; -} - -void -md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) -{ - /* FIXME: This absolute nonsense apparently is to make relative - jumps "work". Of course, it breaks any other type of fixup. */ - if (!strstr (seg->name,".debug")) - { - if (*valP < 128) - *valP /= 2; - if (*valP>268435455) - { - *valP = *valP * (-1); - *valP /= 2; - *valP = 256 - (*valP); - } - } - - gas_cgen_md_apply_fix (fixP, valP, seg); - return; -} - -void -md_convert_frag (bfd *headers ATTRIBUTE_UNUSED, - segT seg ATTRIBUTE_UNUSED, - fragS *fragP ATTRIBUTE_UNUSED) -{ - printf (_("call to md_convert_frag \n")); - abort (); -} diff --git a/gas/config/tc-xc16x.h b/gas/config/tc-xc16x.h deleted file mode 100644 index d38a109..0000000 --- a/gas/config/tc-xc16x.h +++ /dev/null @@ -1,59 +0,0 @@ -/* This file is tc-xc16x.h - Copyright (C) 2006-2022 Free Software Foundation, Inc. - Contributed by KPIT Cummins Infosystems - - This file is part of GAS, the GNU Assembler. - - GAS is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - GAS 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GAS; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA - 02110-1301, USA. */ - -#define TC_XC16X - -#define TARGET_BYTES_BIG_ENDIAN 0 - -#define TARGET_ARCH bfd_arch_xc16x - -#ifdef OBJ_ELF -#define TARGET_FORMAT "elf32-xc16x" -#define LOCAL_LABEL_PREFIX '.' -#define LOCAL_LABEL(NAME) (NAME[0] == '.' && NAME[1] == 'L') -#define FAKE_LABEL_NAME ".L0\001" -#endif - -struct fix; -struct internal_reloc; - -#define WORKING_DOT_WORD - -#define BFD_ARCH bfd_arch_xc16x -#define TC_COUNT_RELOC(x) 1 -#define IGNORE_NONSTANDARD_ESCAPES - -#define TC_RELOC_MANGLE(s,a,b,c) tc_reloc_mangle(a,b,c) -extern void tc_reloc_mangle (struct fix *, struct internal_reloc *, bfd_vma); - -/* No shared lib support, so we don't need to ensure externally - visible symbols can be overridden. */ -#define EXTERN_FORCE_RELOC 0 - -/* Minimum instruction is of 16 bits. */ -#define DWARF2_LINE_MIN_INSN_LENGTH 2 - -#define DO_NOT_STRIP 0 -#define LISTING_HEADER "Infineon XC16X GAS " -#define NEED_FX_R_TYPE 1 -#define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section (FIX, SEC) - -#define md_operand(x) diff --git a/gas/configure b/gas/configure index 1fae77a..e6fe7ee 100755 --- a/gas/configure +++ b/gas/configure @@ -12513,10 +12513,6 @@ $as_echo "$with_priv_spec" >&6; } using_cgen=yes ;; - xc16x) - using_cgen=yes - ;; - xtensa) f=config/xtensa-relax.o case " $extra_objects " in diff --git a/gas/configure.ac b/gas/configure.ac index 572e56e..21795a8 100644 --- a/gas/configure.ac +++ b/gas/configure.ac @@ -646,10 +646,6 @@ changequote([,])dnl using_cgen=yes ;; - xc16x) - using_cgen=yes - ;; - xtensa) f=config/xtensa-relax.o case " $extra_objects " in diff --git a/gas/doc/all.texi b/gas/doc/all.texi index 8feae53..1ea6b7a 100644 --- a/gas/doc/all.texi +++ b/gas/doc/all.texi @@ -46,7 +46,6 @@ @set LM32 @set M32C @set M32R -@set xc16x @set M68HC11 @set S12Z @set M680X0 diff --git a/gas/doc/c-xc16x.texi b/gas/doc/c-xc16x.texi deleted file mode 100644 index 95cf1d5..0000000 --- a/gas/doc/c-xc16x.texi +++ /dev/null @@ -1,80 +0,0 @@ -@c Copyright (C) 2006-2022 Free Software Foundation, Inc. -@c This is part of the GAS manual. -@c For copying conditions, see the file as.texinfo. - -@page -@node xc16x-Dependent -@chapter Infineon xc16x Dependent Features - -@cindex xc16x support -@menu -* xc16x Directives:: xc16x Machine Directives -* xc16x Syntax:: xc16x Syntax -@end menu - -@node xc16x Directives -@section xc16x Machine Directives - -The xc16x version of the assembler supports the following machine -directives: - -@table @code -@cindex @code{align} directive, xc16x -@item .align -This directive aligns the section program counter on the next 2-byte -boundary. - - -@cindex @code{byte} directive, xc16x -@item .byte @var{expr} -This directive assembles a half-word (8-bit) constant. - -@cindex @code{word} directive, xc16x -@item .word @var{expr} -This assembles a word (16-bit) constant. - -@cindex @code{ascii} directive, xc16x -@item .ascii "@var{ascii}" -This directive used for copying @var{str} into the object file. -The string is terminated with a null byte. - -@cindex @code{set} directive, xc16x -@item .set @var{symbol}, @var{value} -This directive creates a symbol named @var{symbol} which is an alias for -another symbol (possibly not yet defined). This should not be confused -with the mnemonic @code{set}, which is a legitimate xc16x instruction. - - - -@cindex @code{bss} directive, xc16x -@item .bss @var{symbol}, @var{length} -Reserve @var{length} bytes in the bss section for a local @var{symbol}, -aligned to the power of two specified by @var{align}. @var{length} and -@var{align} must be positive absolute expressions. This directive -differs from @samp{.lcomm} only in that it permits you to specify -an alignment. -@end table - -@node xc16x Syntax -@section xc16x Syntax -@menu -* xc16x-Chars:: Special Characters -@end menu - -@node xc16x-Chars -@subsection Special Characters - -@cindex line comment character, xc16x -@cindex xc16c line comment character -The presence of a @samp{;} appearing anywhere on a line indicates the -start of a comment that extends to the end of that line. - -If a @samp{#} appears as the first character of a line then the whole -line is treated as a comment, but in this case the line can also be a -logical line number directive (@pxref{Comments}) or a preprocessor -control command (@pxref{Preprocessing}). - -@cindex line separator, xc16x -@cindex statement separator, xc16x -@cindex xc16x line separator -The XC16X assembler does not support a line separator character. diff --git a/gas/po/POTFILES.in b/gas/po/POTFILES.in index c25d4f5..4f42315 100644 --- a/gas/po/POTFILES.in +++ b/gas/po/POTFILES.in @@ -171,8 +171,6 @@ config/tc-visium.c config/tc-visium.h config/tc-wasm32.c config/tc-wasm32.h -config/tc-xc16x.c -config/tc-xc16x.h config/tc-xgate.c config/tc-xgate.h config/tc-xstormy16.c diff --git a/gas/testsuite/gas/xc16x/add.s b/gas/testsuite/gas/xc16x/add.s deleted file mode 100644 index bab7c09..0000000 --- a/gas/testsuite/gas/xc16x/add.s +++ /dev/null @@ -1,17 +0,0 @@ -.text -xc16x_add: -add r0,r1 -add r0,[r1] -add r0,[r1+] -add r0,#3 -add r0,#1234 -add r0,0xffed -add 0xffed,r0 - - - - - - - -
\ No newline at end of file diff --git a/gas/testsuite/gas/xc16x/add_test.s b/gas/testsuite/gas/xc16x/add_test.s deleted file mode 100644 index 7924f50..0000000 --- a/gas/testsuite/gas/xc16x/add_test.s +++ /dev/null @@ -1,92 +0,0 @@ -.text -_start: - add r0,r1 - add r0,r2 - add r0,r3 - add r0,r4 - add r0,r5 - add r0,r6 - add r0,r7 - add r0,r8 - add r0,r9 - add r0,r10 - add r0,r11 - add r0,r12 - add r0,r13 - add r0,r14 - add r0,r15 - - add r1,r0 - add r1,r2 - add r1,r3 - add r1,r4 - add r1,r5 - add r1,r6 - add r1,r7 - add r1,r8 - add r1,r9 - add r1,r10 - add r1,r11 - add r1,r12 - add r1,r13 - add r1,r14 - add r1,r15 - - add r2,r0 - add r2,r1 - add r2,r3 - add r2,r4 - add r2,r5 - add r2,r6 - add r2,r7 - add r2,r8 - add r2,r9 - add r2,r10 - add r2,r11 - add r2,r12 - add r2,r13 - add r2,r14 - add r2,r15 - - add r3,r0 - add r3,r1 - add r3,r2 - add r3,r4 - add r3,r5 - add r3,r6 - add r3,r7 - add r3,r8 - add r3,r9 - add r3,r10 - add r3,r11 - add r3,r12 - add r3,r13 - add r3,r14 - add r3,r15 - - add r0,[r1] - add r0,[r1+] - add r0,#3 - add r0,#0xffff - add r0,0xffff - add 0xffff,r0 - - addb rl0,rh0 - addb rl0[r0] - addb rl0,#3 - addb rl0,#0xff - addb r0,0xff10 - addb 0xff10,r0 - - addc r0,r1 - addc r0,[r1] - addc r0,#3 - addc r0,#0xff12 - addc r0,#0xff12 - addc r0,0xff12 - addc 0xff12,r0 - - addcb rl0,#3 - addcb rl0,#0xff - addcb r0,0xff10 - addcb 0xff10,r0
\ No newline at end of file diff --git a/gas/testsuite/gas/xc16x/addb.s b/gas/testsuite/gas/xc16x/addb.s deleted file mode 100644 index 7c7dd94..0000000 --- a/gas/testsuite/gas/xc16x/addb.s +++ /dev/null @@ -1,11 +0,0 @@ - .section .text - .global _fun -xc16x_add: - - addb rl0,rl1 - addb rl0,[r1] - addb rl0,[r1+] - addb rl0,#0x2 - addb rl0,#0x33 - addb rl0,0x2387 - addb 0x2387,rl0 diff --git a/gas/testsuite/gas/xc16x/addc.s b/gas/testsuite/gas/xc16x/addc.s deleted file mode 100644 index 8f33699..0000000 --- a/gas/testsuite/gas/xc16x/addc.s +++ /dev/null @@ -1,11 +0,0 @@ - .section .text - .global _fun -xc16x_add: - - addc r0,r1 - addc r0,[r1] - addc r0,[r1+] - addc r0,#0x34 - addc r0,#0x3456 - addc r0,0x2387 - addc 0x2387,r0 diff --git a/gas/testsuite/gas/xc16x/addcb.s b/gas/testsuite/gas/xc16x/addcb.s deleted file mode 100644 index 74cfca7..0000000 --- a/gas/testsuite/gas/xc16x/addcb.s +++ /dev/null @@ -1,17 +0,0 @@ - .section .text - .global _fun -xc16x_add: - - addcb rl0,rl1 - addcb rl0,[r1] - addcb rl0,[r1+] - addcb rl0,#0x02 - addcb rl0,#0x23 - addcb 0x2387,rl0 - - - - - - -
\ No newline at end of file diff --git a/gas/testsuite/gas/xc16x/and.s b/gas/testsuite/gas/xc16x/and.s deleted file mode 100644 index 14e9c7e..0000000 --- a/gas/testsuite/gas/xc16x/and.s +++ /dev/null @@ -1,14 +0,0 @@ -.section .text -.global _fun - -xc16x_and: - - and r0,r1 - and r0,[r1] - and r0,[r1+] - and r0,#3 - and r0,#0xfcbe - and r0,0x0230 - and 0x320,r0 - -
\ No newline at end of file diff --git a/gas/testsuite/gas/xc16x/andb.s b/gas/testsuite/gas/xc16x/andb.s deleted file mode 100644 index eee0ab8..0000000 --- a/gas/testsuite/gas/xc16x/andb.s +++ /dev/null @@ -1,10 +0,0 @@ - .section .text - .global _fun -xc16x_andb: - andb rl0,rl1 - andb rl0,[r1] - andb rl0,[r1+] - andb rl0,#3 - andb rl0,#0xbe - andb rl0,0x0230 - andb 0x320,rl0 diff --git a/gas/testsuite/gas/xc16x/bfldl.s b/gas/testsuite/gas/xc16x/bfldl.s deleted file mode 100644 index 7300c4a..0000000 --- a/gas/testsuite/gas/xc16x/bfldl.s +++ /dev/null @@ -1,4 +0,0 @@ - .text - xc16x_bfldl: - BFLDL r0,#0x87,#0x0e - BFLDH r0,#0xff,#0x0e diff --git a/gas/testsuite/gas/xc16x/bit.s b/gas/testsuite/gas/xc16x/bit.s deleted file mode 100644 index 571e79e..0000000 --- a/gas/testsuite/gas/xc16x/bit.s +++ /dev/null @@ -1,11 +0,0 @@ -.text -xc16x_bit: -bclr r0.1 -bset r0.1 -bmov r0.2,r0.1 -bmovn r0.3,r0.2 -band r0.1,r0.4 -bor r0.1,r0.2 -bxor r0.1,r0.2 -bcmp r0.1,r0.2 -
\ No newline at end of file diff --git a/gas/testsuite/gas/xc16x/calla.s b/gas/testsuite/gas/xc16x/calla.s deleted file mode 100644 index 3604e9a..0000000 --- a/gas/testsuite/gas/xc16x/calla.s +++ /dev/null @@ -1,24 +0,0 @@ -.text -xc16x_calla: -calla cc_uc,0xaaaa -calla cc_z,0xaaaa -calla cc_nz,0xaaaa -calla cc_v,0xaaaa -calla cc_nv,0xaaaa -calla cc_n,0xaaaa -calla cc_nn,0xaaaa -calla cc_c,0xaaaa -calla cc_nc,0xaaaa -calla cc_eq,0xaaaa -calla cc_ne,0xaaaa -calla cc_ult,0xaaaa -calla cc_ule,0xaaaa -calla cc_uge,0xaaaa -calla cc_ugt,0xaaaa -calla cc_sle,0xaaaa -calla cc_sge,0xaaaa -calla cc_sgt,0xaaaa -calla cc_net,0xaaaa -calla cc_slt,0xaaaa - -
\ No newline at end of file diff --git a/gas/testsuite/gas/xc16x/calli.s b/gas/testsuite/gas/xc16x/calli.s deleted file mode 100644 index 807ae1b..0000000 --- a/gas/testsuite/gas/xc16x/calli.s +++ /dev/null @@ -1,21 +0,0 @@ -.text -xc16x_calli: -calli cc_uc,[r1] -calli cc_z,[r1] -calli cc_nz,[r1] -calli cc_v,[r1] -calli cc_nv,[r1] -calli cc_n,[r1] -calli cc_nn,[r1] -calli cc_c,[r1] -calli cc_nc,[r1] -calli cc_eq,[r1] -calli cc_ne,[r1] -calli cc_ult,[r1] -calli cc_ule,[r1] -calli cc_uge,[r1] -calli cc_ugt,[r1] -calli cc_sle,[r1] -calli cc_sge,[r1] -calli cc_net,[r1] -calli cc_slt,[r1] diff --git a/gas/testsuite/gas/xc16x/cmp.s b/gas/testsuite/gas/xc16x/cmp.s deleted file mode 100644 index 5003492..0000000 --- a/gas/testsuite/gas/xc16x/cmp.s +++ /dev/null @@ -1,9 +0,0 @@ -.text -xc16x_cmp: -cmp r0,r1 -cmp r0,[r1] -cmp r0,[r1+] -cmp r0,#3 -cmp r0,#0x0234 -cmp r0,0x3452 -
\ No newline at end of file diff --git a/gas/testsuite/gas/xc16x/cmp_test.s b/gas/testsuite/gas/xc16x/cmp_test.s deleted file mode 100644 index 932ce96..0000000 --- a/gas/testsuite/gas/xc16x/cmp_test.s +++ /dev/null @@ -1,45 +0,0 @@ -.text -cmp r0,r1 -cmp r0,[r1] -cmp r0,[r1+] -cmp r0,#3 -cmp r0,#0x0234 -cmp r0,0x3452 - -cmp r0,r1 -cmp r0,[r1] -cmp r0,[r1+] -cmp r0,#3 -cmp r0,#0xcdef -cmp r0,0xcdef - -cmpb rl0,rl1 -cmpb rl0,[r1] -cmpb rl0,[r1+] -cmpb rl0,#3 -cmpb rl0,#cd -cmpb rl0,0x0234 - -cmpb rl0,rl1 -cmpb rl0,[r1] -cmpb rl0,[r1+] -cmpb rl0,#3 -cmpb rl0,#cd -cmpb rl0,0xcdef - -cmpd1 r0,#0x0f -cmpd1 r0,#0x0fccb -cmpd1 r0,0xffcb -cmpd2 r0,#0x0f -cmpd2 r0,#0x0fccb -cmpd2 r0,0xffcb - -cmpi1 r0,#0x0f -cmpi1 r0,#0x0fccb -cmpi1 r0,0xffcb -cmpi2 r0,#0x0f -cmpi2 r0,#0x0fccb -cmpi2 r0,0xffcb - - - diff --git a/gas/testsuite/gas/xc16x/cmpb.s b/gas/testsuite/gas/xc16x/cmpb.s deleted file mode 100644 index 3dfc698..0000000 --- a/gas/testsuite/gas/xc16x/cmpb.s +++ /dev/null @@ -1,8 +0,0 @@ -.text -xc16x_cmpb: -cmpb rl0,rl1 -cmpb rl0,[r1] -cmpb rl0,[r1+] -cmpb rl0,#3 -cmpb rl0,#34 -cmpb rl0,0x0234 diff --git a/gas/testsuite/gas/xc16x/cmpi.s b/gas/testsuite/gas/xc16x/cmpi.s deleted file mode 100644 index 8136890..0000000 --- a/gas/testsuite/gas/xc16x/cmpi.s +++ /dev/null @@ -1,18 +0,0 @@ -.section .text -.global _fun - -xc16x_cmpd: - - cmpd1 r0,#0x0f - cmpd1 r0,#0x0fccb - cmpd1 r0,0xffcb - cmpd2 r0,#0x0f - cmpd2 r0,#0x0fccb - cmpd2 r0,0xffcb - cmpi1 r0,#0x0f - cmpi1 r0,#0x0fccb - cmpi1 r0,0xffcb - cmpi2 r0,#0x0f - cmpi2 r0,#0x0fccb - cmpi2 r0,0xffcb -
\ No newline at end of file diff --git a/gas/testsuite/gas/xc16x/cpl.s b/gas/testsuite/gas/xc16x/cpl.s deleted file mode 100644 index b0d9817..0000000 --- a/gas/testsuite/gas/xc16x/cpl.s +++ /dev/null @@ -1,7 +0,0 @@ - .section .text - .global _fun - -xc16x_cpl_cplb: - - cpl r0 - cplb rl0 diff --git a/gas/testsuite/gas/xc16x/div.s b/gas/testsuite/gas/xc16x/div.s deleted file mode 100644 index 7b5ad9e..0000000 --- a/gas/testsuite/gas/xc16x/div.s +++ /dev/null @@ -1,8 +0,0 @@ - .section .text - .global _fun -xc16x_div: - - div r0 - divl r0 - divlu r0 - divu r0 diff --git a/gas/testsuite/gas/xc16x/jmpa.s b/gas/testsuite/gas/xc16x/jmpa.s deleted file mode 100644 index 732cc47..0000000 --- a/gas/testsuite/gas/xc16x/jmpa.s +++ /dev/null @@ -1,23 +0,0 @@ -.text -xc16x_jmpa: - jmpa cc_UC,0xaaaa - jmpa cc_Z,0xaaaa - jmpa cc_NZ,0xaaaa - jmpa cc_V,0xaaaa - jmpa cc_NV,0xaaaa - jmpa cc_N,0xaaaa - jmpa cc_NN,0xaaaa - jmpa cc_ULT,0xaaaa - jmpa cc_UGE,0xaaaa - jmpa cc_Z,0xaaaa - jmpa cc_NZ,0xaaaa - jmpa cc_ULT,0xaaaa - jmpa cc_ULE,0xaaaa - jmpa cc_UGE,0xaaaa - jmpa cc_UGT,0xaaaa - jmpa cc_SLE,0xaaaa - jmpa cc_SGE,0xaaaa - jmpa cc_SGT,0xaaaa - jmpa cc_NET,0xaaaa - - diff --git a/gas/testsuite/gas/xc16x/jmpi.s b/gas/testsuite/gas/xc16x/jmpi.s deleted file mode 100644 index 337d5fa..0000000 --- a/gas/testsuite/gas/xc16x/jmpi.s +++ /dev/null @@ -1,24 +0,0 @@ -.section .text -.global _fun - -xc16x_jmpi: - - jmpi cc_UC, [r7] - jmpi cc_z, [r7] - jmpi cc_NZ, [r7] - jmpi cc_V, [r7] - jmpi cc_NV, [r7] - jmpi cc_N, [r7] - jmpi cc_NN, [r7] - jmpi cc_C, [r7] - jmpi cc_NC, [r7] - jmpi cc_EQ, [r7] - jmpi cc_NE, [r7] - jmpi cc_ULT,[r7] - jmpi cc_ULE,[r7] - jmpi cc_UGE,[r7] - jmpi cc_UGT,[r7] - jmpi cc_SLE,[r7] - jmpi cc_SGE,[r7] - jmpi cc_SGT,[r7] - jmpi cc_NET,[r7] diff --git a/gas/testsuite/gas/xc16x/jmpr.s b/gas/testsuite/gas/xc16x/jmpr.s deleted file mode 100644 index 7fbdfac..0000000 --- a/gas/testsuite/gas/xc16x/jmpr.s +++ /dev/null @@ -1,25 +0,0 @@ - .section .text - .global _fun - -xc16x_jmpr: - - jmpr cc_uc, xc16x_jmpr - jmpr cc_z, xc16x_jmpr - jmpr cc_nz, xc16x_jmpr - jmpr cc_v, xc16x_jmpr - jmpr cc_nv, xc16x_jmpr - jmpr cc_n, xc16x_jmpr - jmpr cc_nn, xc16x_jmpr - jmpr cc_c, xc16x_jmpr - jmpr cc_nc, xc16x_jmpr - jmpr cc_eq, xc16x_jmpr - jmpr cc_ne, xc16x_jmpr - jmpr cc_ult,xc16x_jmpr - jmpr cc_ule,xc16x_jmpr - jmpr cc_uge,xc16x_jmpr - jmpr cc_ugt,xc16x_jmpr - jmpr cc_sle,xc16x_jmpr - jmpr cc_sge,xc16x_jmpr - jmpr cc_sgt,xc16x_jmpr - jmpr cc_net,xc16x_jmpr - jmpr cc_slt,xc16x_jmpr diff --git a/gas/testsuite/gas/xc16x/mov.s b/gas/testsuite/gas/xc16x/mov.s deleted file mode 100644 index 164d97c..0000000 --- a/gas/testsuite/gas/xc16x/mov.s +++ /dev/null @@ -1,20 +0,0 @@ - .section .text - .global _fun -xc16x_mov: - - mov r0,r1 - mov r0,#02 - mov r0,#0xfcbe - mov r0,[r1] - mov r0,[r1+] - mov [r0],r1 - mov [-r0],r1 - mov [r0],[r1] - mov [r0+],[r1] - mov [r0],[r1+] - mov r0,[r0+#0xffcb] - mov [r0+#0xffcb],r0 - mov [r0],0xffcb - mov 0xffcb,[r0] - mov r0,0xffcb - mov 0xffcb,r0 diff --git a/gas/testsuite/gas/xc16x/mov_test.s b/gas/testsuite/gas/xc16x/mov_test.s deleted file mode 100644 index a3776c1..0000000 --- a/gas/testsuite/gas/xc16x/mov_test.s +++ /dev/null @@ -1,85 +0,0 @@ - .xc16x - mov r0,r1 - mov r0,#02 - mov r0,#0x0001 - mov r0,[r1] - mov r0,[r1+] - mov [r0],r1 - mov [-r0],r1 - mov [r0],[r1] - mov [r0+],[r1] - mov [r0],[r1+] - mov r0,[r0+#0x0001] - mov [r0+#0x0001],r0 - mov [r0],0x0001 - mov 0x0001,[r0] - mov r0,0x0001 - mov 0x0001,r0 - - mov r0,r1 - mov r0,#02 - mov r0,#0xffff - mov r0,[r1] - mov r0,[r1+] - mov [r0],r1 - mov [-r0],r1 - mov [r0],[r1] - mov [r0+],[r1] - mov [r0],[r1+] - mov r0,[r0+#0xffff] - mov [r0+#0xffff],r0 - mov [r0],0xffff - mov 0xffff,[r0] - mov r0,0xffff - mov 0xffff,r0 - - movb rl0,r2 - movb rl0,#0x12 - movb r3,[r2] - movb rl0,[r2+] - movb [-r2],rl0 - movb [r3],[r2+] - movb [r3],[r2] - movb [r2+],[r3] - movb [r2],[r3+] - movb rl0,[r3+#0x1234] - movb [r3+#0x1234],rl0 - movb [r3],0x1234 - movb [r3],0x1234 - movb 0x1234,[r3] - movb rl0,0x12 - movb 0x12,rl0 - - movb rl0,r2 - movb rl0,#0xff - movb r3,[r2] - movb rl0,[r2+] - movb [-r2],rl0 - movb [r3],[r2+] - movb [r3],[r2] - movb [r2+],[r3] - movb [r2],[r3+] - movb rl0,[r3+#0xffff] - movb [r3+#0xffff],rl0 - movb [r3],0xffff - movb [r3],0xffff - movb 0xffff,[r3] - movb rl0,0xff - movb 0xff,rl0 - - movbs r0,rl1 - movbs r0,0x12 - movbs 0x1234,rl0 - - movbs r0,rl1 - movbs r0,0xff - movbs 0xffff,rl0 - - movbz r2,rl0 - movbz r0,0x1234 - movbz 0x1234,rl0 - - movbz r2,rl0 - movbz r0,0xffff - movbz 0xffff,rl0 -
\ No newline at end of file diff --git a/gas/testsuite/gas/xc16x/movb.s b/gas/testsuite/gas/xc16x/movb.s deleted file mode 100644 index 3050704..0000000 --- a/gas/testsuite/gas/xc16x/movb.s +++ /dev/null @@ -1,26 +0,0 @@ - .section .text - .global _fun -xc16x_movb: - - movb rl0,r2 - movb rl0,#0x12 - movb r3,[r2] - movb rl0,[r2+] - movb [-r2],rl0 - movb [r3],[r2+] - movb [r3],[r2] - movb [r2+],[r3] - movb [r2],[r3+] - movb rl0,[r3+#0x1234] - movb [r3+#0x1234],rl0 - movb [r3],0x1234 - movb [r3],0xeeff - movb 0x1234,[r3] - movb rl0,0x12 - movb 0x12,rl0 - - - - - -
\ No newline at end of file diff --git a/gas/testsuite/gas/xc16x/movbs.s b/gas/testsuite/gas/xc16x/movbs.s deleted file mode 100644 index 36bed4d..0000000 --- a/gas/testsuite/gas/xc16x/movbs.s +++ /dev/null @@ -1,8 +0,0 @@ - .section .text - .global _fun - -xc16x_movbs: - - movbs r0,rl1 - movbs r0,0xff - movbs 0xffcb,rl0 diff --git a/gas/testsuite/gas/xc16x/movbz.s b/gas/testsuite/gas/xc16x/movbz.s deleted file mode 100644 index 8571f96..0000000 --- a/gas/testsuite/gas/xc16x/movbz.s +++ /dev/null @@ -1,9 +0,0 @@ - .section .text - .global _fun -xc16x_movbz: - - movbz r2,rl0 - movbz r0,0x23dd - movbz 0x23,rl0 - -
\ No newline at end of file diff --git a/gas/testsuite/gas/xc16x/mul.s b/gas/testsuite/gas/xc16x/mul.s deleted file mode 100644 index 0e7c4be..0000000 --- a/gas/testsuite/gas/xc16x/mul.s +++ /dev/null @@ -1,6 +0,0 @@ - .section .text - .global _fun -xc16x_mul: - - mul r0,r1 - mulu r0,r1 diff --git a/gas/testsuite/gas/xc16x/neg.s b/gas/testsuite/gas/xc16x/neg.s deleted file mode 100644 index b95824e..0000000 --- a/gas/testsuite/gas/xc16x/neg.s +++ /dev/null @@ -1,6 +0,0 @@ - .section .text - .global _fun -xc16x_neg: - - neg r0 - negb rl0 diff --git a/gas/testsuite/gas/xc16x/nop.s b/gas/testsuite/gas/xc16x/nop.s deleted file mode 100644 index cc297e1..0000000 --- a/gas/testsuite/gas/xc16x/nop.s +++ /dev/null @@ -1,6 +0,0 @@ - .section .text - .global _fun -xc16x_nop: - nop - nop - diff --git a/gas/testsuite/gas/xc16x/or.s b/gas/testsuite/gas/xc16x/or.s deleted file mode 100644 index 46deecc..0000000 --- a/gas/testsuite/gas/xc16x/or.s +++ /dev/null @@ -1,11 +0,0 @@ - .section .text - .global _fun -xc16x_or: - - or r0,r1 - or r0,[r1] - or r0,[r1+] - or r0,#3 - or r0,#0x0234 - or r0,0x4536 - or 0x4536,r0 diff --git a/gas/testsuite/gas/xc16x/orb.s b/gas/testsuite/gas/xc16x/orb.s deleted file mode 100644 index 62bfa76..0000000 --- a/gas/testsuite/gas/xc16x/orb.s +++ /dev/null @@ -1,10 +0,0 @@ - .section .text - .global _fun -xc16x_or: - orb rl0,rl1 - orb rl0,[r1] - orb rl0,[r1+] - orb rl0,#3 - orb rl0,#0x23 - orb rl0,0x0234 - orb 0x0234,rl0 diff --git a/gas/testsuite/gas/xc16x/prior.s b/gas/testsuite/gas/xc16x/prior.s deleted file mode 100644 index aa4bb78..0000000 --- a/gas/testsuite/gas/xc16x/prior.s +++ /dev/null @@ -1,5 +0,0 @@ - .section .text - .global _fun -xc16x_prior: - - prior r0,r1 diff --git a/gas/testsuite/gas/xc16x/pushpop.s b/gas/testsuite/gas/xc16x/pushpop.s deleted file mode 100644 index 4fafde6..0000000 --- a/gas/testsuite/gas/xc16x/pushpop.s +++ /dev/null @@ -1,5 +0,0 @@ - .section .text - .global _fun -xc16x_pushpop: - pop r0 - push r0 diff --git a/gas/testsuite/gas/xc16x/ret.s b/gas/testsuite/gas/xc16x/ret.s deleted file mode 100644 index 62278a5..0000000 --- a/gas/testsuite/gas/xc16x/ret.s +++ /dev/null @@ -1,9 +0,0 @@ - .section .text - .global _fun - -xc16x_ret: - ret - reti - rets - retp r5 - diff --git a/gas/testsuite/gas/xc16x/scxt.s b/gas/testsuite/gas/xc16x/scxt.s deleted file mode 100644 index e8a23c3..0000000 --- a/gas/testsuite/gas/xc16x/scxt.s +++ /dev/null @@ -1,6 +0,0 @@ - .section .text - .global _fun -xc16x_scxt: - scxt r0,#0xffff - scxt r0,0xffff - diff --git a/gas/testsuite/gas/xc16x/shlrol.s b/gas/testsuite/gas/xc16x/shlrol.s deleted file mode 100644 index 801bab6..0000000 --- a/gas/testsuite/gas/xc16x/shlrol.s +++ /dev/null @@ -1,14 +0,0 @@ - .section .text - .global _fun -xc16x_shlrol: - - shl r0,r1 - shl r0,#4 - shr r0,r1 - shr r0,#4 - rol r0,r1 - rol r0,#4 - ror r0,r1 - ror r0,#4 - ashr r0,r1 - ashr r0,#4 diff --git a/gas/testsuite/gas/xc16x/sub.s b/gas/testsuite/gas/xc16x/sub.s deleted file mode 100644 index 5baad82..0000000 --- a/gas/testsuite/gas/xc16x/sub.s +++ /dev/null @@ -1,19 +0,0 @@ - .section .text - .global _fun -xc16x_sub: - - sub r0,r1 - sub r0,[r1] - sub r0,[r1+] - sub r0,#0x1 - sub r0,#0x7643 - sub r0,0x7643 - sub 0x7643,r0 - - - - - - - -
\ No newline at end of file diff --git a/gas/testsuite/gas/xc16x/sub_test.s b/gas/testsuite/gas/xc16x/sub_test.s deleted file mode 100644 index 880102e..0000000 --- a/gas/testsuite/gas/xc16x/sub_test.s +++ /dev/null @@ -1,70 +0,0 @@ - .text -_start: - sub r0,r1 - sub r0,[r1] - sub r0,[r1+] - sub r0,#0x1 - sub r0,#0x7643 - sub r0,0x7643 - sub 0x7643,r0 - - sub r1,r0 - sub r1,[r0] - sub r1,[r0+] - sub r1,#0x1 - sub r1,#0xCDEF - sub r1,0xCDEF - sub 0xCDEF,r1 - - - subb rl0,rl1 - subb rl0,[r1] - subb rl0,[r1+] - subb rl0,#0x1 - subb rl0,#0x43 - subb rl0,0x7643 - subb 0x7643,rl0 - - subb rl1,rl0 - subb rl1,[r0] - subb rl1,[r0+] - subb rl1,#0x1 - subb rl1,#0xCD - subb rl1,0xCDEF - subb 0xCDEF,rl1 - - - - subc r0,r1 - subc r0,[r1] - subc r0,[r1+] - subc r0,#0x2 - subc r0,#0x43 - subc r0,0x7643 - subc 0x7643,r0 - - subc r1,r0 - subc r1,[r0] - subc r1,[r0+] - subc r1,#0xC - subc r1,#0xCD - subc r1,0xCDEF - subc 0xCDEF,r1 - - subcb rl0,rl1 - subcb rl0,[r1] - subcb rl0,[r1+] - subcb rl0,#0x2 - subcb rl0,#0x43 - subcb rl0,0x7643 - subcb 0x7643,rl0 - - subcb rl0,rl1 - subcb rl0,[r1] - subcb rl0,[r1+] - subcb rl0,#0x2 - subcb rl0,#0x43 - subcb rl0,0x7643 - subcb 0x7643,rl0 - -
\ No newline at end of file diff --git a/gas/testsuite/gas/xc16x/subb.s b/gas/testsuite/gas/xc16x/subb.s deleted file mode 100644 index c066a43..0000000 --- a/gas/testsuite/gas/xc16x/subb.s +++ /dev/null @@ -1,19 +0,0 @@ - .section .text - .global _fun -xc16x_subb: - - subb rl0,rl1 - subb rl0,[r1] - subb rl0,[r1+] - subb rl0,#0x1 - subb rl0,#0x43 - subb rl0,0x7643 - subb 0x7643,rl0 - - - - - - - -
\ No newline at end of file diff --git a/gas/testsuite/gas/xc16x/subc.s b/gas/testsuite/gas/xc16x/subc.s deleted file mode 100644 index a8af7d0..0000000 --- a/gas/testsuite/gas/xc16x/subc.s +++ /dev/null @@ -1,19 +0,0 @@ - .section .text - .global _fun -xc16x_subc: - - subc r0,r1 - subc r0,[r1] - subc r0,[r1+] - subc r0,#0x2 - subc r0,#0x43 - subc r0,0x7643 - subc 0x7643,r0 - - - - - - - -
\ No newline at end of file diff --git a/gas/testsuite/gas/xc16x/subcb.s b/gas/testsuite/gas/xc16x/subcb.s deleted file mode 100644 index e8911ee..0000000 --- a/gas/testsuite/gas/xc16x/subcb.s +++ /dev/null @@ -1,20 +0,0 @@ - .section .text - .global _fun -xc16x_subcb: - - subcb rl0,rl1 - subcb rl0,[r1] - subcb rl0,[r1+] - subcb rl0,#0x2 - subcb rl0,#0x43 - subcb rl0,0x7643 - subcb 0x7643,rl0 - - - - - - - - -
\ No newline at end of file diff --git a/gas/testsuite/gas/xc16x/syscontrol1.s b/gas/testsuite/gas/xc16x/syscontrol1.s deleted file mode 100644 index c21f07d..0000000 --- a/gas/testsuite/gas/xc16x/syscontrol1.s +++ /dev/null @@ -1,12 +0,0 @@ - .section .text - .global _fun -xc16x_syscontrol: - srst - sbrk - idle - pwrdn - srvwdt - diswdt - enwdt - einit - diff --git a/gas/testsuite/gas/xc16x/syscontrol2.s b/gas/testsuite/gas/xc16x/syscontrol2.s deleted file mode 100644 index 61fb703..0000000 --- a/gas/testsuite/gas/xc16x/syscontrol2.s +++ /dev/null @@ -1,26 +0,0 @@ -.text -xc16x_syscontrol2: - extr #0x4 - extr #0x3 - extr #0x2 - extr #0x1 - - atomic #0x4 - atomic #0x3 - atomic #0x2 - atomic #0x1 - - extp r5,#0x4 - extp #0x3ff,#0x4 - extpr r5,#0x4 - extpr #0x3ff,#0x4 - - exts r5,#0x4 - exts #0x1,#0x4 - - extsr r5,#0x4 - extsr #0x1,#0x4 - - - - diff --git a/gas/testsuite/gas/xc16x/trap.s b/gas/testsuite/gas/xc16x/trap.s deleted file mode 100644 index f8dc87b..0000000 --- a/gas/testsuite/gas/xc16x/trap.s +++ /dev/null @@ -1,6 +0,0 @@ - .section .text - .global _fun - -xc16x_trap: - - trap #0x02 diff --git a/gas/testsuite/gas/xc16x/xc16x.exp b/gas/testsuite/gas/xc16x/xc16x.exp deleted file mode 100644 index ad8da3e..0000000 --- a/gas/testsuite/gas/xc16x/xc16x.exp +++ /dev/null @@ -1,1333 +0,0 @@ -# Copyright (C) 2012-2022 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. - -# -# Some xc16x tests -# -proc do_xc16x_add {} { - set testname "add.s: xc16x add word tests" - set x 0 - - gas_start "add.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 0001\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 0809\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 080D\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 0803\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 06F0D204\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c 02F0EDFF\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 04F0EDFF\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 7] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_addb {} { - set testname "addb.s: xc16x add byte tests" - set x 0 - - gas_start "addb.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 0102\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 0909\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 090D\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 0902\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 07F03300\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c 03F08723\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 05F08723\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 7] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_addc {} { - set testname "addc.s: xc16x add with carry tests" - set x 0 - - gas_start "addc.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 1001\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 1809\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 180D\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 16F03400\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000a 16F05634\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000e 12F08723\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0012 14F08723\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 7] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_addcb {} { - set testname "addcb.s: xc16x add byte with carry tests" - set x 0 - - gas_start "addcb.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 1102\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 1909\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 190D\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 17F00200\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000a 17F02300\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000e 15F08723\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 6] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_sub {} { - set testname "sub.s: xc16x sub tests" - set x 0 - - gas_start "sub.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 2001\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 2809\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 280D\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 2801\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 26F04376\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c 22F04376\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 24F04376\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 7] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_subb {} { - set testname "subb.s: xc16x sub byte tests" - set x 0 - - gas_start "subb.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 2102\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 2909\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 290D\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 2901\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 27F04300\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c 23F04376\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 25F04376\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 7] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_subc {} { - set testname "subc.s: xc16x sub with carry tests" - set x 0 - - gas_start "subc.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 3001\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 3809\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 380D\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 3802\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 36F04300\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c 32F04376\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 34F04376\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 7] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_subcb {} { - set testname "subcb.s: xc16x sub byte with carry tests" - set x 0 - - gas_start "subcb.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 3102\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 3909\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 390D\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 3902\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 37F04300\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c 33F04376\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 35F04376\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 7] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_and {} { - set testname "and.s: xc16x and tests" - set x 0 - - gas_start "and.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 6001\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 6809\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 680D\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 6803\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 66F0BEFC\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c 62F03002\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 64F02003\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 7] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_andb {} { - set testname "andb.s: xc16x and byte tests" - set x 0 - - gas_start "andb.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 6102\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 6909\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 690D\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 6903\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 67F0BE00\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c 63F03002\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 65F02003\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 7] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_or {} { - set testname "or.s: xc16x or tests" - set x 0 - - gas_start "or.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 7001\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 7809\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 780D\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 7803\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 76F03402\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c 72F03645\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 74F03645\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 7] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_xor {} { - set testname "xor.s: xc16x xor tests" - set x 0 - - gas_start "xor.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 5001\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 5809\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 580D\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 5803\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 56F03402\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c 52F03402\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 54F03402\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 7] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_xorb {} { - set testname "xorb.s: xc16x xorb tests" - set x 0 - - gas_start "xorb.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 5102\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 5909\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 590D\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 5903\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 57F03400\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c 53F00324\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 55F00324\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 7] then { pass $testname } else { fail $testname } - -} - -proc do_xc16x_mov {} { - set testname "mov.s: xc16x mov tests" - set x 0 - - gas_start "mov.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 F001\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 E6F00200\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 E6F0BEFC\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000a A801\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c 9801\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000e B810\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 8810\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0012 C801\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0014 D801\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0016 E801\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0018 D400CBFF\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 001c C400CBFF\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0020 8400CBFF\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0024 9400CBFF\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0028 F2F0CBFF\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 002c F6F0CBFF\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 16] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_movb {} { - set testname "movb.s: xc16x movb tests" - set x 0 - - gas_start "movb.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 F3F00000\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 E7F01200\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 B4020000\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c 9902\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000e 8902\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 E932\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0012 C932\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0014 D923\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0016 E923\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0018 F4033412\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 001c E4033412\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0020 A4033412\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0024 A403FFEE\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0028 B4033412\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 002c F3F01200\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0030 F7F01200\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 16] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_movbs {} { - set testname "movbs.s: xc16x mov byte tests" - set x 0 - - gas_start "movbs.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 D020\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 D2F0FF00\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 D5F0CBFF\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 3] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_movbz {} { - set testname "movbz.s: xc16x movbz tests" - set x 0 - - gas_start "movbz.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 C002\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 C2F0DD23\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 C5F02300\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 3] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_pushpop {} { - set testname "pushpop.s: xc16x push/pop tests" - set x 0 - - gas_start "pushpop.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 FCF0\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 ECF0\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 2] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_shlrol {} { - set testname "shlrol.s: xc16x shift and rotate tests" - set x 0 - - gas_start "shlrol.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 4C01\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 5C40\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 6C01\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 7C40\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 0C01\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000a 1C40\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c 2C01\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000e 3C40\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 AC01\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0012 BC40\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 10] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_neg {} { - set testname "neg.s: xc16x neg tests" - set x 0 - - gas_start "neg.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 8100\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 A100\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 2] then { pass $testname } else { fail $testname } -} -proc do_xc16x_mul {} { - set testname "mul.s: xc16x multiply tests" - set x 0 - - gas_start "mul.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 0B01\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 1B01\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 2] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_div {} { - set testname "div.s: xc16x division tests" - set x 0 - - gas_start "div.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 4B00\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 6B00\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 7B00\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 5B00\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 4] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_jmpa {} { - set testname "jmpa.s: xc16x jump absolute test" - set x 0 - - gas_start "jmpa.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 EA00AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 EA20AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 EA30AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c EA40AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 EA50AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0014 EA60AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0018 EA70AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 001c EA80AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0020 EA90AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0024 EA20AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0028 EA30AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 002c EA80AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0030 EAF0AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0034 EA90AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0038 EAE0AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 003c EAB0AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0040 EAD0AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0044 EAA0AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0048 EA10AAAA\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 19] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_jmpi {} { - set testname "jmpi.s: xc16x jmp immidiate tests " - set x 0 - - gas_start "jmpi.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 9C07\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 9C27\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 9C37\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 9C47\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 9C57\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000a 9C67\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c 9C77\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000e 9C87\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 9C97\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0012 9C27\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0014 9C37\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0016 9C87\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0018 9CF7\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 001a 9C97\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 001c 9CE7\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 001e 9CB7\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0020 9CD7\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0022 9CA7\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0024 9C17\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 19] then { pass $testname } else { fail $testname } -} - - -proc do_xc16x_jmpr {} { - set testname "jmpr.s: xc16x jump relative tests" - set x 0 - - gas_start "jmpr.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 0DFF\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 2DFE\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 3DFD\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 4DFC\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 5DFB\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000a 6DFA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c 7DF9\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000e 8DF8\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 9DF7\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0012 2DF6\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0014 3DF5\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0016 8DF4\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0018 FDF3\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 001a 9DF2\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 001c EDF1\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 001e BDF0\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0020 DDEF\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0022 ADEE\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0024 1DED\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0026 CDEC\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 20] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_syscontrol1 {} { - set testname "syscontrol1.s: xc16x system control insrutions tests" - set x 0 - - gas_start "syscontrol1.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 B748B7B7\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 8C00\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 87788787\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000a 97689797\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000e A758A7A7\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0012 A55AA5A5\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0016 857A8585\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 001a B54AB5B5\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 8] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_syscontrol2 {} { - set testname "syscontrol2.s: xc16x syscontrol2 tests" - set x 0 - - gas_start "syscontrol2.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 D1B0\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 D1A0\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 D190\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 D180\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 D130\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000a D120\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c D110\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000e D100\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 DC75\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0012 D770FF03\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0016 DCF5\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0018 D7F0FF03\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 001c DC35\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 001e D7300100\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0022 DCB5\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0024 D7B00100\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 16] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_cpl {} { - set testname "cpl.s: xc16x compliment tests" - set x 0 - - gas_start "cpl.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 9100\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 B100\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 2] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_cmp {} { - set testname "cmp.s: xc16x misc tests" - set x 0 - - gas_start "cmp.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 4001\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 4809\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 480D\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 4803\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 46F03402\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c 42F05234\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 6] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_cmpb {} { - set testname "cmpb.s: xc16x cmp byte tests" - set x 0 - - gas_start "cmpb.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 4102\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 4909\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 490D\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 4903\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 47F02200\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c 43F03402\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 6] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_cmpi {} { - set testname "cmpi.s: xc16x cmpi tests" - set x 0 - - gas_start "cmpi.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 A0F0\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 A6F0CBFC\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 A2F0CBFF\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000a B0F0\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c B6F0CBFC\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 B2F0CBFF\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0014 80F0\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0016 86F0CBFC\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 001a 82F0CBFF\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 001e 90F0\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0020 96F0CBFC\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0024 92F0CBFF\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 12] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_calli {} { - set testname "calli.s: xc16x call tests" - set x 0 - - gas_start "calli.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 AB01\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 AB21\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 AB31\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 AB41\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 AB51\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000a AB61\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c AB71\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000e AB81\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 AB91\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0012 AB21\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0014 AB31\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0016 AB81\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0018 ABF1\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 001a AB91\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 001c ABE1\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 001e ABB1\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0020 ABD1\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0022 AB11\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0024 ABC1\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 19] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_calla {} { - set testname "calla.s: xc16x call tests" - set x 0 - - gas_start "calla.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 CA00AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 CA20AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 CA30AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c CA40AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 CA50AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0014 CA60AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0018 CA70AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 001c CA80AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0020 CA90AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0024 CA20AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0028 CA30AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 002c CA80AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0030 CAF0AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0034 CA90AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0038 CAE0AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 003c CAB0AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0040 CAD0AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0044 CAA0AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0048 CA10AAAA\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 004c CAC0AAAA\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 20] then { pass $testname } else { fail $testname } -} - - -proc do_xc16x_bit {} { - set testname "bit.s: xc16x bit manipulation tests" - set x 0 - - gas_start "bit.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 1EF0\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 1FF0\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 4AF0F012\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 3AF0F023\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c 6AF0F041\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 5AF0F021\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0014 7AF0F021\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0018 2AF0F021\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 8] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_bfldl {} { - set testname "bfldl.s: xc16x bitwise modify masked data tests" - set x 0 - - gas_start "bfldl.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 0AF0870E\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 1AF00EFF\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 2] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_ret {} { - set testname "ret.s: xc16x ret tests" - set x 0 - - gas_start "ret.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 CB00\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 FB88\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 DB00\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 EBF5\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 4] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_trap {} { - set testname "trap.s: xc16x add/sub tests" - set x 0 - - gas_start "trap.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 9B04\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 1] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_orb {} { - set testname "orb.s: xc16x or byte instructions tests" - set x 0 - - gas_start "orb.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 7102\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 7909\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 790D\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0006 7903\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0008 77F02300\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 000c 73F03402\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0010 75F03402\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 7] then { pass $testname } else { fail $testname } -} - - -proc do_xc16x_prior {} { - set testname "prior.s: Determine no shift cycles tests" - set x 0 - - gas_start "prior.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 2B01\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 1] then { pass $testname } else { fail $testname } -} - -proc do_xc16x_nop {} { - set testname "nop.s: no operation nop tests" - set x 0 - - gas_start "nop.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 CC00\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0002 CC00\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 2] then { pass $testname } else { fail $testname } -} - - -proc do_xc16x_scxt {} { - set testname "scxt.s: push direct word to system stack tests" - set x 0 - - gas_start "scxt.s" "-al" - - # Check each instruction bit pattern to verify it got - # assembled correctly. - while 1 { - expect { - -re " +\[0-9\]+ 0000 C6F0FFFF\[^\n\]*\n" { set x [expr $x+1] } - -re " +\[0-9\]+ 0004 D6F0FFFF\[^\n\]*\n" { set x [expr $x+1] } - timeout { perror "timeout\n"; break } - eof { break } - } - } - - # This was intended to do any cleanup necessary. It kinda looks like it - # isn't needed, but just in case, please keep it in for now. - gas_finish - - # Did we find what we were looking for? If not, flunk it. - if [expr $x == 2] then { pass $testname } else { fail $testname } -} - - -if [istarget xc16x*-*-*] then { - # Test the basic xc16x instruction parser - do_xc16x_add - do_xc16x_addb - do_xc16x_addc - do_xc16x_addcb - do_xc16x_sub - do_xc16x_subb - do_xc16x_subc - do_xc16x_subcb - do_xc16x_and - do_xc16x_andb - do_xc16x_or - do_xc16x_xor - do_xc16x_xorb - do_xc16x_mov - do_xc16x_movb - do_xc16x_movbs - do_xc16x_movbz - do_xc16x_shlrol - do_xc16x_neg - do_xc16x_mul - do_xc16x_div - do_xc16x_jmpa - do_xc16x_jmpi - do_xc16x_jmpr - do_xc16x_syscontrol1 - do_xc16x_syscontrol2 - do_xc16x_cpl - do_xc16x_cmp - do_xc16x_cmpb - do_xc16x_cmpi - do_xc16x_calla - do_xc16x_calli - do_xc16x_bit - do_xc16x_bfldl - do_xc16x_ret - do_xc16x_trap - do_xc16x_orb - do_xc16x_prior - do_xc16x_nop - do_xc16x_scxt - -} diff --git a/gas/testsuite/gas/xc16x/xor.s b/gas/testsuite/gas/xc16x/xor.s deleted file mode 100644 index bdc83d7..0000000 --- a/gas/testsuite/gas/xc16x/xor.s +++ /dev/null @@ -1,10 +0,0 @@ - .section .text - .global _fun -xc16x_or: - xor r0,r1 - xor r0,[r1] - xor r0,[r1+] - xor r0,#3 - xor r0,#0x0234 - xor r0,0x0234 - xor 0x0234,r0 diff --git a/gas/testsuite/gas/xc16x/xorb.s b/gas/testsuite/gas/xc16x/xorb.s deleted file mode 100644 index faf4a76..0000000 --- a/gas/testsuite/gas/xc16x/xorb.s +++ /dev/null @@ -1,10 +0,0 @@ - .section .text - .global _fun -xc16x_xorb: - xorb rl0,rl1 - xorb rl0,[r1] - xorb rl0,[r1+] - xorb rl0,#3 - xorb rl0,#0x34 - xorb rl0,0x2403 - xorb 0x2403,rl0 |