]> sourceware.org Git - cgen.git/log
cgen.git
10 months agoUpdate year range in emitted copyright notice master
Alan Modra [Thu, 4 Jan 2024 12:12:25 +0000 (22:42 +1030)]
Update year range in emitted copyright notice

10 months agosim: tighten up generated decode tables
Mike Frysinger [Fri, 22 Dec 2023 00:57:14 +0000 (19:57 -0500)]
sim: tighten up generated decode tables

The use of /* fall through */ with consective case statements doesn't
really add any value, and when generating large files, can take up a
lot of space.  In the case of cris, it alone adds ~20k, or ~10%.

Also trim the space before the : with case statements.

10 months agosim: avoid shadowing vars when decoding insns
Mike Frysinger [Fri, 22 Dec 2023 00:43:43 +0000 (19:43 -0500)]
sim: avoid shadowing vars when decoding insns

When generating switch decode tables, the switch statements all use
the same variable name "val".  This causes nested switches to shadow
earlier ones.  Use the existing "switch-num" to generate unique names
when nesting since it's otherwise unused.

Previously we'd have:

...
    {
      unsigned int val = (((insn >> 4) & (255 << 0)));
      switch (val)
      {
...
      case 15 :
        {
          unsigned int val = (((insn >> 12) & (15 << 0)));
          switch (val)
          {
...

Leading to:
.../sim/cris/decodev10.c: In function ‘crisv10f_decode’:
.../sim/cris/decodev10.c:351:24: error: declaration of ‘val’ shadows a previous local [-Werror=shadow=compatible-local]
  351 |           unsigned int val = (((insn >> 12) & (15 << 0)));
      |                        ^~~
.../sim/cris/decodev10.c:331:20: note: shadowed declaration is here
  331 |       unsigned int val = (((insn >> 4) & (255 << 0)));
      |                    ^~~

Now we have:
...
    {
      unsigned int val0 = (((insn >> 4) & (255 << 0)));
      switch (val0)
      {
...
      case 15 :
        {
          unsigned int val1 = (((insn >> 12) & (15 << 0)));
          switch (val1)
          {
...

10 months agosim: mark local insn var as unused [PR sim/31181]
Mike Frysinger [Thu, 21 Dec 2023 04:26:13 +0000 (23:26 -0500)]
sim: mark local insn var as unused [PR sim/31181]

Some insns are fully decoded by the time they execute here, and don't
need to extract any more fields.  This leads to the local insn var
being unused which triggers compiler warnings.  Mark it as unused so
we don't require ports to stub it themselves.

Bug: https://sourceware.org/PR31181

14 months agoEnable the Guile compiler
Tom Tromey [Tue, 22 Aug 2023 17:47:52 +0000 (11:47 -0600)]
Enable the Guile compiler

This patch changes cgen so that the Guile compiler can be used.
Mainly this is done by using eval-when to ensure that files are loaded
during the compilation process.  However, "-s" handling and
srcdir-setting are also cleaned up, using Guile's (current-filename)
feature.

The main benefit of using the compiler is that it is much faster, once
the scripts have been compiled.  Also it simplifies the use of cgen,
as users don't need to remember to set an environment variable before
invoking it.

14 months agoRemove pprint.scm and cos-pprint.scm
Tom Tromey [Sat, 19 Aug 2023 17:41:41 +0000 (11:41 -0600)]
Remove pprint.scm and cos-pprint.scm

pprint.scm and cos-pprint.scm are for debugging.  They aren't used
in-tree and Guile provides a pretty-printer now.

14 months agoLoad macros before uses
Tom Tromey [Sat, 19 Aug 2023 17:41:37 +0000 (11:41 -0600)]
Load macros before uses

This hoists the various calls to 'load' to an earlier spot in
read.scm.  Without this patch, the call to logit
/cmd-define-rtl-version would not be expanded, leading to a mysterious
error about trying to 'apply' a syntax transformer.  That is, this is
another situation where the old code assumed that macro expansion
could be interleaved with evaluation.

14 months agoNuke cgen-call-with-debugging and cgen-debugging-stack-start
Tom Tromey [Sat, 19 Aug 2023 17:41:34 +0000 (11:41 -0600)]
Nuke cgen-call-with-debugging and cgen-debugging-stack-start

cgen-call-with-debugging and cgen-debugging-stack-start are ostensibly
just for Guile, but I don't think they provide much value with more
recent versions of Guile.  This patch removes them.

14 months agoInvalid code in rtx-traverse.scm
Tom Tromey [Sat, 19 Aug 2023 17:41:31 +0000 (11:41 -0600)]
Invalid code in rtx-traverse.scm

The Guile compiler pointed out a 3-argument call to cons in
rtx-traverse.scm.  Presumably this code is never run, but this patch
replaces it with what I think is the correct form.

14 months agoHack cos.scm to work with new Guile
Tom Tromey [Sat, 19 Aug 2023 17:41:28 +0000 (11:41 -0600)]
Hack cos.scm to work with new Guile

cos.scm calls procedure->memoizing-macro, which no longer exists in Guile.

This patch hacks around this by having the member accessors always use
the "slow" path.  In practice, with Guile 3.0, this is still fast
enough on my machine.

Longer term this code should all be removed in favor of GOOPS.

14 months agoRemove define-in-define
Tom Tromey [Sat, 19 Aug 2023 17:41:25 +0000 (11:41 -0600)]
Remove define-in-define

Guile does not like 'define' in certain contexts, such as within the
body of another 'define'.  This replaces some instances of this with
let or let*.

14 months agoRemove let bindings of macros
Tom Tromey [Sat, 19 Aug 2023 17:41:23 +0000 (11:41 -0600)]
Remove let bindings of macros

rtx-funcs.scm assumes that it can let-bind to macros and the right
thing will happen.  However, this is not correct according to more
recent versions of Guile, which more cleanly separate the expansion
and evaluation phases.

Remove the bindings and simply refer to the wordier names.

14 months agoUse define-macro in rtl.scm
Tom Tromey [Sat, 19 Aug 2023 17:41:20 +0000 (11:41 -0600)]
Use define-macro in rtl.scm

rtl.scm uses defmacro:syntax-transformer, but that no longer exists in
more recent versions of Guile.

Replace these uses with define-macro -- which IMO is clearer anyway.

Note that defmacro could not be used here, as Guile's implementation
has a bug that prevents it from being used with non-canonical lists.

14 months agoRemove support for old versions of Guile
Tom Tromey [Sat, 19 Aug 2023 17:41:17 +0000 (11:41 -0600)]
Remove support for old versions of Guile

This removes support for older versions of Guile.

14 months agoFix bug in insn.scm
Tom Tromey [Sat, 19 Aug 2023 17:41:13 +0000 (11:41 -0600)]
Fix bug in insn.scm

insn.scm has a bit of invalid code.  I forget, but perhaps this was
pointed out by the Guile compiler.  Fix it.

14 months agoRemove =? and >=? aliases
Tom Tromey [Sat, 19 Aug 2023 17:41:09 +0000 (11:41 -0600)]
Remove =? and >=? aliases

=? and >=? are aliases for = and >=.  Remove these and update the few
users.

14 months agoRemove bound-symbol?
Tom Tromey [Sat, 19 Aug 2023 17:41:02 +0000 (11:41 -0600)]
Remove bound-symbol?

bound-symbol? is not used, remove it.

14 months agoRemove some 'fastcall' code
Tom Tromey [Sat, 19 Aug 2023 17:40:58 +0000 (11:40 -0600)]
Remove some 'fastcall' code

There are some comments referring to 'fastcall', which apparently is
some sort of compilation mode for the presumably obsolete Hobbit
scheme compiler.

This patch removes this code and in the process removes some
unnecessary global variables, by turning them into let bindings.

14 months agoAdd a .gitignore
Tom Tromey [Sat, 19 Aug 2023 17:40:54 +0000 (11:40 -0600)]
Add a .gitignore

Add a .gitignore to make 'git status' easier to read.

14 months agosim: update to reduce generated file differences
Alan Modra [Thu, 10 Aug 2023 02:34:17 +0000 (12:04 +0930)]
sim: update to reduce generated file differences

Put binutils-gdb commit db7858e227f3 (Mike Frysinger 2015-06-12) and
13a590ca65f7 (Mike Frysinger 2017-02-13) in the source rather than
generated files.

22 months agoUpdate year range in emitted copyright notice
Mike Frysinger [Mon, 2 Jan 2023 00:22:19 +0000 (19:22 -0500)]
Update year range in emitted copyright notice

2 years agosim-cpu: move cpu_data inside arch-specific cpu state
Mike Frysinger [Tue, 1 Nov 2022 14:44:30 +0000 (20:29 +0545)]
sim-cpu: move cpu_data inside arch-specific cpu state

The cgen ports store their data inside sim_cpu which, currently, is
defined uniquely for every sim arch port.  We're changing that in the
sim world so that there is a single common sim_cpu, but this requires
moving the arch-specific data (including this cgen data) into a new
struct that is accessed via the common sim_cpu structure.

That is all hidden behind a new @ARCH@_SIM_CPU macro, so add that call
to the CPU_CGEN_HW macro that is generated here.

2 years agosim: tighten up generated whitespace
Mike Frysinger [Sun, 27 Jun 2021 14:55:34 +0000 (10:55 -0400)]
sim: tighten up generated whitespace

The current files generate extra newlines in places.  Tighten
it up to match the current code as it exits in the sim tree.

2 years agocgen: remove use of PTR
Alan Modra [Tue, 10 May 2022 00:01:32 +0000 (09:31 +0930)]
cgen: remove use of PTR

Nowadays binutils and sim both require at least C99 compilers,
negating the need for macros like PTR.

* desc-cpu.scm (gen-maybe-multi-ifld): Remove PTR casts.
(gen-multi-ifield-nodes, gen-operand-table): Likewise.
* desc.scm (gen-table-entry): Likewise.
* opc-itab.scm (gen-minsn-table-entry): Likewise.
(gen-minsn-opcode-entry): Likewise.
* opc-asmdis.scm (gen-print-switch): Emit void * in place of PTR.

2 years agoUpdate year range in emitted copyright notice
Alan Modra [Sat, 1 Jan 2022 22:10:43 +0000 (08:40 +1030)]
Update year range in emitted copyright notice

* utils.scm (copyright-fsf, copyright-red-hat): Update emitted
copyright dates.

3 years agoCompute correct mask and values when offset in define-ifield is not 0.
Guillermo E. Martinez [Wed, 15 Sep 2021 16:47:40 +0000 (18:47 +0200)]
Compute correct mask and values when offset in define-ifield is not 0.

If an instruction field is defined in a long form, assigning
an offset different to 0 the mask and constant values are not
computed appropriately:

(dwf f-op-fld-offset "field with an offset" (all-isas) 32 64 31 32 UINT)
;;
;; 63              39  32 31         7            0
;; +---------------------+-------....-------------+
;; |/////////////////////|           |            |
;; +---------------------+-------....-------------+
;;           |
;;           |
;;           |
;;           |
;;           +---> OP_FLD_OFFSET_...

bitrange: #(object <bitrange> 29 32 31 32 64 #t)
mask: 0xffffffff
value: simplify.inc:173:3: Error: Instruction has opcode
       bits outside of its mask.

Fixed to:

bitrange: #(object <bitrange> 29 32 31 32 64 #t)
mask: 0xffffffff00000000
value:      0xaa00000000

word-length relies in base-len (sum of length of all fields
in bitrange objects that conform the instruction), word-value
and word-mask are not using the offset entry in the bitrange
object to calculate the accurate values when constant fields
are provided (ifld-constant? #t), so one more argument
is passed to those procedures to be used in the compute.

Regression tests to the following targets were done:

bpf arm-linuxeabi arm-nacl arm-netbsdelf arm-nto arm-pe
arm-symbianelf arm-vxworks arm-wince-pe aarch64-linux alpha-dec-vms
alpha-linux alpha-linuxecoff alpha-netbsd alpha-unknown-freebsd4.7
am33_2.0-linux arc-linux-uclibc avr-elf bfin-elf cr16-elf cris-elf
crisv32-linux crx-elf d10v-elf d30v-elf dlx-elf epiphany-elf fr30-elf
frv-elf frv-linux ft32-elf h8300-elf hppa-linux hppa-hp-hpux10
hppa64-hp-hpux11.23 hppa64-linux mips-linux mips-vxworks mips64-linux
mipsel-linux-gnu mipsisa32el-linux mips64-openbsd mipstx39-elf
ia64-elf ia64-freebsd5 ia64-hpux ia64-linux ia64-netbsd ia64-vms
ip2k-elf iq2000-elf lm32-elf m32c-elf m32r-elf m68hc11-elf
m68hc12-elf m68k-elf m68k-linux m68k-netbsd mcore-elf mcore-pe
mep-elf metag-linux microblaze-elf mmix mn10200-elf mn10300-elf
moxie-elf ms1-elf msp430-elf mt-elf nds32le-elf nios2-linux or1k-elf
pdp11-dec-aout pj-elf powerpc-eabisim powerpc-eabivle powerpc-linux
powerpc-nto powerpc-wrs-vxworks powerpc64-linux powerpcle-cygwin
powerpcle-elf powerpc64le-linux ppc-lynxos pru-elf riscv32-elf
riscv64-elf rl78-elf rs6000-aix4.3.3 rs6000-aix5.1 rx-elf s390-linux
s390x-linux score-elf sh-linux sh-nto sh-pe sh-rtems sh-vxworks
shl-unknown-netbsdelf sparc-aout sparc-linux sparc-vxworks
sparc64-linux sparc-sun-solaris2.12 spu-elf tic30-unknown-aout
tic30-unknown-coff tic4x-coff tic54x-coff tic6x-elf tilegx-linux
tilepro-linux v850-elf vax-netbsdelf visium-elf i386-darwin
i386-lynxos i586-linux i686-nacl i686-pc-beos i686-pc-elf i686-pe
i686-vxworks x86_64-linux x86_64-w64-mingw32 x86_64-nacl xgate-elf
xstormy16-elf xtensa-elf z8k-coff z80-coff.

2021-09-15  Guillermo E. Martinez  <guillermo.e.martinez@oracle.com>

* ifield.scm: word-len has a relative value depending of word-offset
value, method field-value use word-offset parameter.
* insn.scm: remove condition ifld-beyond-base? in insn-base-value
procedure to allow field access when its offset is different to zero.
* utils.scm: word-value/work-mask accept an offset as argument to
compute the mask and get the value when offset is different that zero.

3 years agostart a simple MAINTAINERS file
Mike Frysinger [Tue, 14 Sep 2021 19:45:00 +0000 (15:45 -0400)]
start a simple MAINTAINERS file

3 years agosim-cpu: stop emitting unused record_trace_results stub function
Mike Frysinger [Sun, 27 Jun 2021 14:55:34 +0000 (10:55 -0400)]
sim-cpu: stop emitting unused record_trace_results stub function

This isn't called anywhere, and no one implements it, so stop emitting
it.  All the cgen ports trigger compiler warnings because of it atm.

3 years agosim: add arch prefix to sim_machs
Mike Frysinger [Tue, 29 Jun 2021 01:36:50 +0000 (21:36 -0400)]
sim: add arch prefix to sim_machs

We want to namespace the sim_machs structure to avoid conflicts when
linking multiple architectures into a single build.

3 years agosid/sim: constify sim_machs storage
Mike Frysinger [Mon, 28 Jun 2021 15:33:56 +0000 (11:33 -0400)]
sid/sim: constify sim_machs storage

The array itself is read-only, so mark it const.

3 years agodesc: include stdlib.h for free() prototype
Mike Frysinger [Wed, 19 May 2021 02:01:04 +0000 (22:01 -0400)]
desc: include stdlib.h for free() prototype

3 years agosim-decode: include cgen-mem & cgen-ops
Mike Frysinger [Sun, 27 Jun 2021 03:26:58 +0000 (23:26 -0400)]
sim-decode: include cgen-mem & cgen-ops

The bpf & cris ports use functions from both of these APIs, so include
them here for all ports just in case (and since there isn't an API for
ports to declare specific additional headers they need).

3 years agosim: rename TRACE_EXTRACT to CGEN_TRACE_EXTRACT
Mike Frysinger [Sun, 31 Jan 2021 21:40:48 +0000 (16:40 -0500)]
sim: rename TRACE_EXTRACT to CGEN_TRACE_EXTRACT

As was done for other touch points in the sim project, add a CGEN_
prefix to namespace it away from the common code.  The generated
files have already been updated years ago.

3 years agoUpdate year range in emitted copyright notice
Alan Modra [Thu, 31 Dec 2020 23:05:41 +0000 (09:35 +1030)]
Update year range in emitted copyright notice

4 years agodesc-cpu.scm: support passing the instruction endianness to cgen_cpu_open
Jose E. Marchesi [Fri, 29 May 2020 14:03:48 +0000 (16:03 +0200)]
desc-cpu.scm: support passing the instruction endianness to cgen_cpu_open

2020-05-29  Jose E. Marchesi  <jemarch@gnu.org>

* desc-cpu.scm (/gen-cpu-open): Support passing the instruction
endianness to cgen_cpu_open.

4 years agoReplace "if (x) free (x)" with "free (x)"
Alan Modra [Thu, 21 May 2020 00:44:26 +0000 (10:14 +0930)]
Replace "if (x) free (x)" with "free (x)"

* desc-cpu.scm (@arch@_cgen_cpu_close): Free without first
checking for non-NULL.

4 years agoUpdate to autotools used by binutils
Alan Modra [Thu, 13 Jun 2019 01:45:07 +0000 (11:15 +0930)]
Update to autotools used by binutils

When cgen source is installed in the top source directory of
binutils-gdb and configuring with --enable-maintainer-mode
--enable-cgen-maint=yes it is somewhat annoying to regenerate cgen
files without differences due to using different autotools.
Particularly so since the generated files in the git repository don't
all use the same autotools.

This patch fixes that by modernising the source a little and
regenerating with autoconf-2.69 and automake-1.15.1.

Note that doc/stamp-vti and doc/version.texi contain dates taken from
your checked out doc/cgen.texi file time stamp.  So in order to
regenerate these files consistently it is necessary to
  touch --date=xxx doc/cgen.texi
with the date taken from the last doc/cgen.texi commit.

* configure.ac: Renamed from configure.in.
(AC_INIT, AM_INIT_AUTOMAKE): Modernize.
(AC_CONFIG_SRCDIR): Invoke.
* INSTALL: Adjust for configure.ac renaming.
* Makefile.am (AUTOMAKE_OPTIONS): Delete cygnus and version.
Add foreign.
* testsuite/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
* doc/Makefile.am (AUTOMAKE_OPTIONS): Delete cygnus, add foreign,
info-in-builddir and no-texinfo.tex.
(DISTCLEANFILES): Delete automake-1.9 hack.
* Makefile.in: Regenerate.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* doc/Makefile.in: Regenerate.
* doc/stamp-vti: Regenerate.
* testsuite/Makefile.in: Regenerate.

4 years agoCopyright update
Alan Modra [Fri, 7 Feb 2020 13:38:33 +0000 (00:08 +1030)]
Copyright update

5 years agogen-doc: Updates for latest cpu definitions
Stafford Horne [Sat, 1 Jun 2019 07:26:29 +0000 (16:26 +0900)]
gen-doc: Updates for latest cpu definitions

Doc generation was no longer working due to several issues.

 - openrisc.cpu no longer exists (its not cpu/or1k.cpu in binutils-gdb)
 - Relavive paths for archfile no longer work due to wrong cwd.
 - Many architectures have been added and removed.

I have be able to get this working and added all the architectures I
could get working with the below changes. I have posted the results
here:

  http://shorne.noip.me/downloads/gen-doc/

ChangeLog:

yyyy-mm-dd  Stafford Horne  <shorne@gmail.com>

* gen-all-doc (archs): Add new archs and update locations.
(archfile): Prepend cgendir.
(index.html gen): Change name openrisc to or1k.
* html.scm (gen-html-trailer): Change redhat.com to
sourceware.org.

5 years agocgen: Add unordered compare operation
Stafford Horne [Sat, 1 Jun 2019 07:26:28 +0000 (16:26 +0900)]
cgen: Add unordered compare operation

On OpenRISC we have added FPU unordered comparison operations (NaN
detection).  This patch adds the unordered operation which will generate
c hooks to be implemented in simulators.

An unordered comparison can now be defined as:

  ; Compare unordered (set flag if either r1 or r2 is NaN)
  (set BI flag (unordered WI r1 r2))

  ; Compare unordered, greater than or equal
  (set BI flag (or (unordered WI r1 r2)
   (ge WI r1 r2)))

ChangeLog:

yyyy-mm-dd  Stafford Horne  <shorne@gmail.com>

* rtl-c.scm (unordered): New comparison operation.
* rtx-funcs.scm (unordered): New rtx node.

5 years agocgen: partial support for 64-bit wide fields in 32-bit hosts
Jose E. Marchesi [Tue, 14 May 2019 18:09:25 +0000 (20:09 +0200)]
cgen: partial support for 64-bit wide fields in 32-bit hosts

Hi people!

This patch adds support for having 64-bit wide fields working in
32-bit hosts.  This is not a complete solution, but it is enough for
supporting:

- Defining a 64-bit h-sint in your .cpu file.
- Using that hardware to define an operand featuring as index a
  64-bit wide multi-ifield.

Note that the current CGEN support in binutils provides
cgen_{extract,insert}_normal functions that get `long' values, hence
the need for the operand to be indexed by a multi-ifield.

This is used by an eBPF binutils port which I will be upstreaming this
week.  All other CGEN-based ports currently in binutils are not
impacted by this change.

Eventually, we shall make the "portable" INT/UINT modes (and
associated hardwares s-int/s-uint) to work properly in 32-bit hosts
when holding 64-bit values.

I have a tentative large patch attempting that, including changes in
binutils's opcodes CGEN support, that I will send for comments soon,
but in the meanwhile I would really appreciate if this gets into cgen.
(Without this patch applied, the eBPF assembler doesn't work properly
in 32-bit hosts.)

Thanks!

2019-05-14  Jose E. Marchesi  <jose.marchesi@oracle.com>

* opcodes.scm (gen-ifield-default-type): Use int64_t for fields
wider than 32-bits.
(/gen-parse-number): Use u?int64_t for > 32-bit modes.
(gen-ifield-value-decl): Fix call to gen-ifield-default-type.
(<ifield>, gen-insert): Likewise.
(<ifield>, gen-extract): Likewise.
* opc-asmdis.scm (char): Likewise.

5 years agomanual: remove obsolete comment about using multi-ifields in operands
Jose E. Marchesi [Tue, 14 May 2019 18:32:40 +0000 (20:32 +0200)]
manual: remove obsolete comment about using multi-ifields in operands

This little patch removes an obsolete comment from the manual.
Multi-ifields certainly work as indexes in instruction operands.

Salud!

ChangeLog:

2019-05-14  Jose E. Marchesi  <jose.marchesi@oracle.com>

* doc/rtl.texi (Instruction operands): Remove obsolete comment
about multi-ifields.

5 years ago * utils.scm: Update emitted copyright dates.
Alan Modra [Tue, 1 Jan 2019 11:51:25 +0000 (11:51 +0000)]
* utils.scm: Update emitted copyright dates.

5 years ago2018-11-20 Jose E. Marchesi <jose.marchesi@oracle.com>
Frank Ch. Eigler [Tue, 20 Nov 2018 20:32:39 +0000 (20:32 +0000)]
2018-11-20  Jose E. Marchesi  <jose.marchesi@oracle.com>

* doc/running.texi (Set up the arguments for cgen): Raised from a
subsection to a section.

6 years agobinutils opcodes error messages
Alan Modra [Sat, 3 Mar 2018 01:31:31 +0000 (01:31 +0000)]
binutils opcodes error messages

This patch is aimed at making binutils/opcodes files comply with the
GNU coding standard regarding error messages, that is, they should
start with the program name followed by a colon, then a lower case
message.  Accomplished by calling opcodes_error_handler to output the
program name (and final '\n'), rather than calling fprintf.

* desc-cpu.scm (opcodes_error_handler): Define.
(@arch@_cgen_rebuild_tables): Use opcodes_error_handler.
(@arch@_cgen_cpu_open): Likewise.
* opc-asmdis.scm (@arch@_cgen_parse_operand): Likewise.
(@arch@_cgen_print_operand): Likewise.
* opc-ibld.scm (@arch@_cgen_get_int_operand): Likewise.
(@arch@_cgen_get_vma_operand): Likewise.
(@arch@_cgen_set_int_operand): Likewise.
(@arch@_cgen_set_vma_operand): Likewise.
(@arch@_cgen_insert_operand): Likewise.
(@arch@_cgen_extract_operand): Likewise.
* utils.scm: Update emitted copyright dates.

7 years ago PR 20946
Alan Modra [Thu, 13 Apr 2017 11:58:48 +0000 (11:58 +0000)]
PR 20946
* desc-cpu.scm (lookup_mach_via_bfd_name): Return NULL if the name
could not be matched.
(@arch@_cgen_cpu_open): Allow for lookup_mach_via_bfd_name returning

7 years ago * utils.scm: Update emitted copyright dates.
Alan Modra [Fri, 7 Apr 2017 22:38:16 +0000 (22:38 +0000)]
* utils.scm: Update emitted copyright dates.

8 years ago2016-07-18 Trevor Saunders <tbsaunde@tbsaunde.org>
Frank Ch. Eigler [Mon, 25 Jul 2016 15:39:06 +0000 (15:39 +0000)]
2016-07-18  Trevor Saunders <tbsaunde@tbsaunde.org>

* desc-cpu.scm, opc-itab.sbm: Emit extern "C" { ... } wrappers to
make generated code usable by C++.

8 years agocgen: sim: Updates to sim files to match gdb types
Mike Frysinger [Mon, 9 May 2016 21:50:25 +0000 (21:50 +0000)]
cgen: sim: Updates to sim files to match gdb types

The types like MACH and MODEL have changes to SIM_MACH and SIM_MODEL
make updates to match these changes.  This way people dont have to
manually update the generated files in GDB.

8 years agoUpdate emitted copyright notice dates
Alan Modra [Fri, 22 Apr 2016 02:03:49 +0000 (02:03 +0000)]
Update emitted copyright notice dates

* utils.scm: Update emitted copyright dates.

8 years ago2016-04-14 Trevor Saunders <tbsaunde@tbsaunde.org>
Frank Ch. Eigler [Thu, 14 Apr 2016 15:27:54 +0000 (15:27 +0000)]
2016-04-14  Trevor Saunders  <tbsaunde@tbsaunde.org>

        * opc-itab.scm (asm_hash_insn_p): Stop using old style arguments.
        (dis_hash_insn_p): Likewise.
        (asm_hash_insn): Likewise.
        (dis_hash_insn): Likewise.
        * opc-opinst.scm (@arch@_cgen_init_opinst_table): Likewise.

8 years agoMake large enum constants hex
Alan Modra [Wed, 2 Mar 2016 12:23:31 +0000 (12:23 +0000)]
Make large enum constants hex

* enum.scm (gen-enum-decl): Emit large numbers as hex.  Tidy
start-sanitize.  Upcase just the identifiers.

10 years agoor1k support
Alan Modra [Mon, 19 May 2014 01:24:00 +0000 (01:24 +0000)]
or1k support
        * sim-arch.scm (WI, UWI, AI, IAI): Define.
        * rtl-c.scm (mul-o1flag, mul-o2flag, rem): New.
        * rtx-funcs.scn (mul-o1flag, mul-o2flag, rem): New.

11 years agoAdd copyright notices
Nick Clifton [Mon, 17 Dec 2012 16:55:42 +0000 (16:55 +0000)]
Add copyright notices

11 years agoAdd copyright notices
Nick Clifton [Mon, 10 Dec 2012 12:47:54 +0000 (12:47 +0000)]
Add copyright notices

12 years ago * Makefile.am: Add install-html and install-pdf.
Mike Stump [Tue, 30 Oct 2012 01:17:28 +0000 (01:17 +0000)]
* Makefile.am: Add install-html and install-pdf.
* Makefile.in: Regenerate.

13 years agoPatch for sid/cgen setter error.
Frank Ch. Eigler [Mon, 29 Aug 2011 17:31:16 +0000 (17:31 +0000)]
Patch for sid/cgen setter error.

http://sourceware.org/ml/cgen/2011-q3/msg00008.html

Author: John Wehle <john@cybersashi.com>

* sid.scm (/op-gen-set-trace1): Use rtl-c VOID instead of 'VOID.

13 years agoMove cpu files from cgen/cpu to top level cpu directory.
Nick Clifton [Mon, 22 Aug 2011 15:25:10 +0000 (15:25 +0000)]
Move cpu files from cgen/cpu to top level cpu directory.

14 years ago * cpu/xstormy16.cpu (alignfix-mem-far): New macro. Like
Nick Clifton [Wed, 3 Nov 2010 17:02:34 +0000 (17:02 +0000)]
* cpu/xstormy16.cpu (alignfix-mem-far): New macro.  Like
    alignfix-mem, but works with 32-bit addresses.
    (set-alignfix-mem-far): New macro.  Like set-alignfix-mem but
    works with 32-bit addresses.
    (movfgrgri, movfgrgripostinc, movfgrgripredec, movfgrgrii,
    movfgrgriipostinc, movfgrgriipredec): Use alignfix-mem-far.
    (movfgrigr, movfgripostincgr, movfgripredecgr): Use
    set-alignfix-mem-far.
    (movfgrgriipostinc, movfgriipostincgr): Propagate addition to
    source register into base register.
    (movfgrgriipredec, movfgriipredecgr): Propagate subtraction from
    source register into base register.

    * xstormy16-sem.cxx: Regenerate.

        * testutils.inc (pass): Update parameter layout for write syscall.
        (fail): Likewise.
        * movgrgrii.cgs: Fix endianness typo in assertion.
        * movgrgriipostinc.cgs: Likewise.
        * movgrgriipredec.cgs: Likewise.
        * movgrgripostinc.cgs: Likewise.
        * movgrgripredec.cgs: Likewise.
        * movgrigr.cgs: Likewise.
        * movgriipostincgr.cgs: Likewise.
        * movgripostincgr.cgs: Likewise.
        * movgripredecgr.cgs: Likewise.
        * rrcgrgr.cgs: Rotate only inserts carry flag once.
        * rrcgrimm4.cgs: Likewise.
        * movfgrgriipostinc.cgs: New test.  Checks MOVF load with post increment.
        * movfgrgriipredec.cgs: New test.  Checks MOVF load with pre decrement.
        * movfgriipostincgr.cgs: New test.  Checks MOVF store with post increment.
        * movfgriipostincgr.cgs: New test.  Checks MOVF store with pre decrement.

14 years agocgen/
Alan Modra [Sat, 9 Oct 2010 06:50:21 +0000 (06:50 +0000)]
cgen/
* utils-cgen.scm (gen-attr-accessors): Rename bool attribute to bool_.
* cpu/mep.opc (mep_cgen_insn_supported): Ditto.
include/opcode/
* cgen.h (CGEN_ATTR, CGEN_ATTR_TYPE): Rename bool attribute to bool_.
(CGEN_ATTR_BOOLS, CGEN_ATTR_CGEN_INSN_ALIAS_VALUE): Likewise.

opcodes/
* fr30-desc.h: Regenerate.
* frv-desc.h: Regenerate.
* ip2k-desc.h: Regenerate.
* iq2000-desc.h: Regenerate.
* lm32-desc.h: Regenerate.
* m32c-desc.h: Regenerate.
* m32r-desc.h: Regenerate.
* mep-desc.h: Regenerate.
* mep-opc.c: Regenerate.
* mt-desc.h: Regenerate.
* openrisc-desc.h: Regenerate.
* xc16x-desc.h: Regenerate.
* xstormy16-desc.h: Regenerate.

14 years ago * rtl-c.scm (s-float-predop): New function.
Doug Evans [Mon, 30 Aug 2010 16:51:27 +0000 (16:51 +0000)]
* rtl-c.scm (s-float-predop): New function.
(nan, qnan, snan): Call it.

14 years agocgen/
Alan Modra [Mon, 28 Jun 2010 14:41:58 +0000 (14:41 +0000)]
cgen/
* cpu/mep.opc (mep_examine_ivc2_insns): Delete set but unused var.
opcodes/
* mep-dis.c: Regenerate.

14 years agoFix dates :-P
DJ Delorie [Tue, 1 Jun 2010 22:08:35 +0000 (22:08 +0000)]
Fix dates :-P

14 years ago[cgen]
DJ Delorie [Tue, 1 Jun 2010 22:06:50 +0000 (22:06 +0000)]
[cgen]
* cpu/xstormy16.cpu (movgriipostincgr, movgriipredecgr,
movfgriipredecgr): Fix increment/decrement amount.
[sid]
* xstormy16-sem.cxx: Regenerate.

14 years ago * iformat.scm (/sfmt-search-key): Use iformat key instead of list
Doug Evans [Sat, 13 Feb 2010 04:34:49 +0000 (04:34 +0000)]
* iformat.scm (/sfmt-search-key): Use iformat key instead of list
of ifields.

14 years agoupdate copyright year
Doug Evans [Sat, 13 Feb 2010 03:39:15 +0000 (03:39 +0000)]
update copyright year

14 years ago * testsuite/location-1.test: Use %pmacros.
Doug Evans [Fri, 12 Feb 2010 05:32:12 +0000 (05:32 +0000)]
* testsuite/location-1.test: Use %pmacros.

14 years ago * desc-cpu.scm (/gen-cpu-open): Remove comment on K&R support.
Doug Evans [Fri, 12 Feb 2010 02:12:12 +0000 (02:12 +0000)]
* desc-cpu.scm (/gen-cpu-open): Remove comment on K&R support.
* utils-cgen.scm (gen-define-with-symcat): Remove K&R support.

* utils-sim.scm (compute-sformat-argbufs!): Use more consistent name
for name of empty sbuf.

* iformat.scm (/sfmt-search-key, /ifmt-lookup-sfmt!): Add assert.

* insn.scm (<insn>): Add initial value for members fmt-desc, ifmt,
sfmt, tmp.
(/sub-insn-ifields): Delete old commented out code.
(/sub-insn-make!, /parse-insn-format-symbol): Ditto.
* operand.scm (/anyof-merge-setter, anyof-merge-semantics): Ditto.

* sim-decode.scm (/gen-decode-insn-globals): Tweak formatting of
generated code.

14 years ago * gen-all: Print options.
Doug Evans [Wed, 10 Feb 2010 19:28:35 +0000 (19:28 +0000)]
* gen-all: Print options.

14 years agotweak comment
Doug Evans [Wed, 10 Feb 2010 04:22:57 +0000 (04:22 +0000)]
tweak comment

14 years agoadd list of supported apps for application-is?
Doug Evans [Fri, 29 Jan 2010 03:11:43 +0000 (03:11 +0000)]
add list of supported apps for application-is?

14 years ago * pmacros.scm (pmacros-init!): New arg rtl-version, all callers
Doug Evans [Fri, 29 Jan 2010 02:59:02 +0000 (02:59 +0000)]
* pmacros.scm (pmacros-init!): New arg rtl-version, all callers
updated.  Use %-prefix if rtl-version >= 0.9.
* read.scm (/supported-rtl-versions): Add (0 9).
(/rtl-version-valid?): New function.
(/cmd-define-rtl-version): If new rtl version, reinvoke pmacros-init!.
(/reader-expr): New function.
(reader-process): New function.
(/reader-process-with-loc!): Renamed from /reader-process!.
Don't pre-expand `if' commands.
(/cmd-if): Simplify.  Pmacro-expand test, then, else clauses here.
Handle rtl-version-equal?, rtl-version-at-least?.
* testsuite/Makefile.am (clean-test-files): Remove *.test.cpu*.
* testsuite/Makefile.in: Regenerate.
* testsuite/pmacros-1.test: Test both . and % as prefixes.
* testsuite/testsuite.cpu (/begin, /print, /dump): New pmacros.
(newline, print-match, print-expr, print-thunk): Use them.
(internal-verify): Update definition.
* doc/rtl.texi (define-rtl-version): Document rtl version 0.9.
(Top level conditionals): New node.

14 years agotweak comment
Doug Evans [Fri, 29 Jan 2010 02:28:40 +0000 (02:28 +0000)]
tweak comment

14 years ago * read.scm (rtl-version-at-least?): Fix typo.
Doug Evans [Fri, 29 Jan 2010 02:26:57 +0000 (02:26 +0000)]
* read.scm (rtl-version-at-least?): Fix typo.

14 years ago * mach.scm: Follow commenting convention.
Doug Evans [Thu, 28 Jan 2010 05:29:04 +0000 (05:29 +0000)]
* mach.scm: Follow commenting convention.

14 years ago * read.scm: Follow commenting convention.
Doug Evans [Thu, 28 Jan 2010 05:05:47 +0000 (05:05 +0000)]
* read.scm: Follow commenting convention.

14 years ago * pmacros.scm: Follow commenting convention. Replace change to
Doug Evans [Thu, 28 Jan 2010 04:45:15 +0000 (04:45 +0000)]
* pmacros.scm: Follow commenting convention.  Replace change to
$pmacro to %pmacro.  $pmacro is confusing with $ in assembler syntax.
(/pmacro-orig-prefix, /pmacro-prefix): New globals.

14 years ago * co-for-gen-all: Simplify a bit.
Doug Evans [Tue, 26 Jan 2010 03:07:31 +0000 (03:07 +0000)]
* co-for-gen-all: Simplify a bit.

14 years ago * desc-cpu.scm (cgen-desc.h): Don't print virtual enums.
Doug Evans [Mon, 25 Jan 2010 03:50:44 +0000 (03:50 +0000)]
* desc-cpu.scm (cgen-desc.h): Don't print virtual enums.
* sid-cpu.scm (cgen-desc.h): Ditto.
* enum.scm (enum-builtin!): New function.
* read.scm (reader-install-builtin!): Call it.
* rtl-c.scm (s-convop): Delete, replaced with ...
(s-int-convop, s-float-convop): ... new fns.
(ext, zext, trunc): Update.
(fext, ftrunc, float, ufloat, fix, ufix): Update.
* rtx-funcs.scm (fext, ftrunc, float, ufloat, fix, ufix): New parameter
`how'.
* cpu/mep-fmax.cpu (fcvtsw): Update.
* cpu/sh.cpu (h-fsd, h-fmov): Update.
* doc/rtl.texi (float-convop): Update.

* frv.cpu (floating-point-conversion): Update call to fp conv op.
(floating-point-dual-conversion, ne-floating-point-dual-conversion,
conditional-floating-point-conversion, ne-floating-point-conversion,
float-parallel-mul-add-double-semantics): Ditto.

14 years ago * gen-all: Be more consistent with intrinsic generation.
Doug Evans [Mon, 25 Jan 2010 01:08:01 +0000 (01:08 +0000)]
* gen-all: Be more consistent with intrinsic generation.

14 years ago * utils-cgen.scm (<location>): Define using new define-class.
Doug Evans [Mon, 25 Jan 2010 00:40:29 +0000 (00:40 +0000)]
* utils-cgen.scm (<location>): Define using new define-class.
(<ident>, <source-ident>, <context>): Ditto.

* cos.scm (/object-string): New function.
(/object-error): Use it.
(/object-count-true): New function
(object-copy-top): Delete.  All callers changed to call object-copy.
(/parse-member-list, /build-getter-defs, /build-setter-defs): New fns.
(define-class, define-interface, define-method): New macros.
(define-getters, define-setters, vmake): Moved here ...
* utils-cgen.scm: ... from here.

14 years agowhitespace fixes in previous patch
Doug Evans [Sun, 24 Jan 2010 23:54:57 +0000 (23:54 +0000)]
whitespace fixes in previous patch

14 years ago* utils-cgen.scm: Follow commenting convention.
Doug Evans [Sun, 24 Jan 2010 23:48:37 +0000 (23:48 +0000)]
* utils-cgen.scm: Follow commenting convention.

14 years agominor whitespace fix
Doug Evans [Sun, 24 Jan 2010 23:37:39 +0000 (23:37 +0000)]
minor whitespace fix

14 years ago * cos.scm: Follow commenting convention. Why did a single ; have to
Doug Evans [Sun, 24 Jan 2010 21:43:59 +0000 (21:43 +0000)]
* cos.scm: Follow commenting convention.  Why did a single ; have to
get indented like it does? :-(

14 years agogen-all: Be smarter about what diffs to generate.
Doug Evans [Sat, 23 Jan 2010 22:22:28 +0000 (22:22 +0000)]
gen-all: Be smarter about what diffs to generate.

14 years agogen-all: add "force" option
Doug Evans [Sat, 23 Jan 2010 20:24:22 +0000 (20:24 +0000)]
gen-all: add "force" option

14 years agoadd usage info
Doug Evans [Sat, 23 Jan 2010 19:57:20 +0000 (19:57 +0000)]
add usage info

14 years ago * gen-all: Move build-configuration related parameters to an
Doug Evans [Sat, 23 Jan 2010 19:21:27 +0000 (19:21 +0000)]
* gen-all: Move build-configuration related parameters to an
external file.

14 years ago * doc/rtl.texi (Expressions): Add more docs on conversion functions.
Doug Evans [Sat, 23 Jan 2010 18:39:35 +0000 (18:39 +0000)]
* doc/rtl.texi (Expressions): Add more docs on conversion functions.

14 years ago * doc/rtl.texi (Expressions): Fix docs on `subword'.
Doug Evans [Fri, 22 Jan 2010 07:40:39 +0000 (07:40 +0000)]
* doc/rtl.texi (Expressions): Fix docs on `subword'.

14 years agoadd more docs on *nan
Doug Evans [Thu, 21 Jan 2010 09:35:39 +0000 (09:35 +0000)]
add more docs on *nan

14 years ago * rtx-funcs.scm (nan,qnan,snan): New rtl functions.
Doug Evans [Thu, 21 Jan 2010 07:56:42 +0000 (07:56 +0000)]
* rtx-funcs.scm (nan,qnan,snan): New rtl functions.
* rtl-c.scm (nan,qnan,snan): New rtl functions.
* doc/rtl.texi (Expressions): Add docs for them.

14 years ago * rtl-traverse.scm (/rtx-canon-anycexprmode): New function.
Doug Evans [Thu, 21 Jan 2010 07:34:56 +0000 (07:34 +0000)]
* rtl-traverse.scm (/rtx-canon-anycexprmode): New function.
(/rtx-make-canon-table): Add entry for ANYCEXPRMODE.
(/rtx-canon-operands): Print expr-mode if /rtx-canon-debug?
Do final error check on mode assigned to expression.
(/rtx-make-traverser-table): Add entry for ANYCEXPRMODE.
* rtl-xform.scm (/rtx-trim-args): Handle ANYCEXPRMODE.
* rtl.scm (/rtx-valid-mode-types): Add ANYCEXPRMODE.
* rtx-funcs.scm (c-code, c-call, c-raw-call): Use ANYCEXPRMODE.
(if, cond, case): Use ANYEXPRMODE.

14 years agomove Ian's entry to list, that was then ...
Doug Evans [Wed, 20 Jan 2010 06:51:57 +0000 (06:51 +0000)]
move Ian's entry to list, that was then ...

14 years ago(.splice): Note that arguments are evaluated first.
Doug Evans [Wed, 20 Jan 2010 06:31:25 +0000 (06:31 +0000)]
(.splice): Note that arguments are evaluated first.

14 years ago * testsuite/pmacros-1.test: Add more .splice tests.
Doug Evans [Wed, 20 Jan 2010 06:22:19 +0000 (06:22 +0000)]
* testsuite/pmacros-1.test: Add more .splice tests.

14 years ago * read.scm (/cmd-include): Fix absolute path handling.
Doug Evans [Wed, 20 Jan 2010 05:56:59 +0000 (05:56 +0000)]
* read.scm (/cmd-include): Fix absolute path handling.

14 years ago * mode.scm (<mode>) Rename member non-mode-c-type to c-type.
Doug Evans [Wed, 6 Jan 2010 05:05:13 +0000 (05:05 +0000)]
* mode.scm (<mode>) Rename member non-mode-c-type to c-type.
All uses updated.
(mode:non-mode-c-type): Delete.
(mode:c-type): Update.
* rtl-c.scm (s-shop): Fix casting of DI mode values.

14 years ago * gen-all (all_cgen_cpus): Add sh.
Doug Evans [Tue, 5 Jan 2010 06:09:01 +0000 (06:09 +0000)]
* gen-all (all_cgen_cpus): Add sh.

This page took 0.213227 seconds and 5 git commands to generate.