head	1.2;
access;
symbols
	perseant-exfatfs-base-20250801:1.2
	perseant-exfatfs-base-20240630:1.2
	perseant-exfatfs:1.2.0.18
	perseant-exfatfs-base:1.2
	cjep_sun2x:1.2.0.16
	cjep_sun2x-base:1.2
	cjep_staticlib_x-base1:1.2
	cjep_staticlib_x:1.2.0.14
	cjep_staticlib_x-base:1.2
	phil-wifi-20200421:1.2
	phil-wifi-20200411:1.2
	phil-wifi-20200406:1.2
	pgoyette-compat-merge-20190127:1.2
	pgoyette-compat-20190127:1.2
	pgoyette-compat-20190118:1.2
	pgoyette-compat-1226:1.2
	pgoyette-compat-1126:1.2
	pgoyette-compat-1020:1.2
	pgoyette-compat-0930:1.2
	pgoyette-compat-0906:1.2
	pgoyette-compat-0728:1.2
	pgoyette-compat-0625:1.2
	pgoyette-compat-0521:1.2
	pgoyette-compat-0502:1.2
	pgoyette-compat-0422:1.2
	pgoyette-compat-0415:1.2
	pgoyette-compat-0407:1.2
	pgoyette-compat-0330:1.2
	pgoyette-compat-0322:1.2
	pgoyette-compat-0315:1.2
	pgoyette-compat:1.2.0.12
	pgoyette-compat-base:1.2
	perseant-stdc-iso10646:1.2.0.10
	perseant-stdc-iso10646-base:1.2
	prg-localcount2-base3:1.2
	prg-localcount2-base2:1.2
	prg-localcount2-base1:1.2
	prg-localcount2:1.2.0.8
	prg-localcount2-base:1.2
	pgoyette-localcount-20170426:1.2
	bouyer-socketcan-base1:1.2
	pgoyette-localcount-20170320:1.2
	bouyer-socketcan:1.2.0.6
	bouyer-socketcan-base:1.2
	pgoyette-localcount-20170107:1.2
	pgoyette-localcount-20161104:1.2
	localcount-20160914:1.2
	pgoyette-localcount-20160806:1.2
	pgoyette-localcount-20160726:1.2
	pgoyette-localcount:1.2.0.4
	pgoyette-localcount-base:1.2
	netbsd-6-0-6-RELEASE:1.1.1.1
	netbsd-6-1-5-RELEASE:1.1.1.1
	yamt-pagecache-base9:1.2
	yamt-pagecache-tag8:1.1.1.1
	netbsd-6-1-4-RELEASE:1.1.1.1
	netbsd-6-0-5-RELEASE:1.1.1.1
	tls-earlyentropy:1.2.0.2
	tls-earlyentropy-base:1.2
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.2
	riastradh-drm2-base3:1.2
	netbsd-6-1-3-RELEASE:1.1.1.1
	netbsd-6-0-4-RELEASE:1.1.1.1
	netbsd-6-1-2-RELEASE:1.1.1.1
	netbsd-6-0-3-RELEASE:1.1.1.1
	netbsd-6-1-1-RELEASE:1.1.1.1
	riastradh-drm2-base2:1.1.1.1
	riastradh-drm2-base1:1.1.1.1
	riastradh-drm2:1.1.1.1.0.12
	riastradh-drm2-base:1.1.1.1
	netbsd-6-1:1.1.1.1.0.16
	netbsd-6-0-2-RELEASE:1.1.1.1
	netbsd-6-1-RELEASE:1.1.1.1
	netbsd-6-1-RC4:1.1.1.1
	netbsd-6-1-RC3:1.1.1.1
	agc-symver:1.1.1.1.0.14
	agc-symver-base:1.1.1.1
	netbsd-6-1-RC2:1.1.1.1
	netbsd-6-1-RC1:1.1.1.1
	yamt-pagecache-base8:1.1.1.1
	netbsd-6-0-1-RELEASE:1.1.1.1
	yamt-pagecache-base7:1.1.1.1
	matt-nb6-plus-nbase:1.1.1.1
	yamt-pagecache-base6:1.1.1.1
	netbsd-6-0:1.1.1.1.0.10
	netbsd-6-0-RELEASE:1.1.1.1
	netbsd-6-0-RC2:1.1.1.1
	tls-maxphys:1.1.1.1.0.8
	tls-maxphys-base:1.2
	matt-nb6-plus:1.1.1.1.0.6
	matt-nb6-plus-base:1.1.1.1
	netbsd-6-0-RC1:1.1.1.1
	yamt-pagecache-base5:1.1.1.1
	yamt-pagecache-base4:1.1.1.1
	netbsd-6:1.1.1.1.0.4
	netbsd-6-base:1.1.1.1
	yamt-pagecache-base3:1.1.1.1
	yamt-pagecache-base2:1.1.1.1
	yamt-pagecache:1.1.1.1.0.2
	yamt-pagecache-base:1.1.1.1
	gdb-7-3-1:1.1.1.1
	FSF:1.1.1;
locks; strict;
comment	@# @;


1.2
date	2013.10.03.18.30.44;	author christos;	state dead;
branches;
next	1.1;
commitid	ONIIScc2d7qGpS7x;

1.1
date	2011.09.24.20.19.22;	author christos;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2011.09.24.20.19.22;	author christos;	state Exp;
branches
	1.1.1.1.2.1
	1.1.1.1.8.1;
next	;

1.1.1.1.2.1
date	2014.05.22.16.00.32;	author yamt;	state dead;
branches;
next	;
commitid	SRuOnF9k1i4dcyBx;

1.1.1.1.8.1
date	2014.08.19.23.58.38;	author tls;	state dead;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;


desc
@@


1.2
log
@merge conflicts
@
text
@; Collection of macros, for GNU Binutils .cpu files. -*- Scheme -*-
;
; Copyright 2000, 2007, 2009 Free Software Foundation, Inc.
;
; Contributed by Red Hat Inc.
;
; This file is part of the GNU Binutils.
;
; 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.

; Enums.

; Define a normal enum without using name/value pairs.
; This is currently the same as define-full-enum but it needn't remain
; that way (it's define-full-enum that would change).

(define-pmacro (define-normal-enum name comment attrs prefix vals)
  "Define a normal enum, fixed number of arguments."
  (define-full-enum name comment attrs prefix vals)
)

; Define a normal insn enum.

(define-pmacro (define-normal-insn-enum name comment attrs prefix fld vals)
  "Define a normal instruction opcode enum."
  (define-full-insn-enum name comment attrs prefix fld vals)
)

; Instruction fields.

; Normally, fields are unsigned and have no encode/decode needs.

(define-pmacro (define-normal-ifield name comment attrs start length)
  "Define a normal instruction field."
  (define-full-ifield name comment attrs start length UINT #f #f)
)

; For those who don't like typing.

(define-pmacro (df name comment attrs start length mode encode decode)
  "Shorthand form of normal fields requiring mode, encode/decode."
  (define-full-ifield name comment attrs start length mode encode decode)
)
(define-pmacro dnf
  "Shorthand form of define-normal-ifield."
  define-normal-ifield
)

; Define a normal multi-ifield.

(define-pmacro (define-normal-multi-ifield name comment attrs
		 mode subflds insert extract)
  "Define a normal multi-part instruction field."
  (define-full-multi-ifield name comment attrs mode subflds insert extract)
)

; For those who don't like typing.

(define-pmacro dnmf
  "Shorthand form of define-normal-multi-ifield."
  define-normal-multi-ifield
)

; Simple multi-ifields: mode is UINT, default insert/extract support,
; default encode/decode support.

(define-pmacro (dsmf name comment attrs subflds)
  "Define a simple multi-part instruction field."
  (define-full-multi-ifield name comment attrs UINT subflds #f #f)
)

; Hardware.

; Simpler version for most hardware elements.
; Allow special assembler support specification but no semantic-name,
; getter/setter, or layout specs.

(define-pmacro (define-normal-hardware name comment attrs type
		 indices values handlers)
  "Define a normal hardware element."
  (define-full-hardware name comment attrs name type
    indices values handlers () () ())
)

; For those who don't like typing.

(define-pmacro dnh
  "Shorthand form of define-normal-hardware."
  define-normal-hardware
)

; Simpler version of dnh that leaves out the indices, values, handlers,
; getter/setter, and layout specs.
; This is useful for 1 bit registers.
; ??? While dsh and dnh aren't that distinguishable when perusing a .cpu file,
; they both take a fixed number of positional arguments, and dsh is a proper
; subset of dnh with all arguments in the same positions, so methinks things
; are ok.

(define-pmacro (define-simple-hardware name comment attrs type)
  "Define a simple hardware element (usually a scalar register)."
  (define-full-hardware name comment attrs name type () () () () () ())
)

(define-pmacro dsh
  "Shorthand form of define-simple-hardware."
  define-simple-hardware
)

; Operands.

; Simpler version for most operands.
; Allow special assembler support specification but no handlers or
; getter/setter specs.

(define-pmacro (define-normal-operand name comment attrs type index)
  "Define a normal operand."
  (define-full-operand name comment attrs type DFLT index () () ())
)

; For those who don't like typing.

(define-pmacro dno
  "Shorthand form of define-normal-operand."
  define-normal-operand
)

; Deprecated, but still in wide use.

(define-pmacro dnop
  "Shorthand form of define-normal-operand."
  define-normal-operand
)

(define-pmacro (dndo x-name x-mode x-args
		     x-syntax x-base-ifield x-encoding x-ifield-assertion
		     x-getter x-setter)
  "Define a normal derived operand."
  (define-derived-operand
    (name x-name)
    (mode x-mode)
    (args x-args)
    (syntax x-syntax)
    (base-ifield x-base-ifield)
    (encoding x-encoding)
    (ifield-assertion x-ifield-assertion)
    (getter x-getter)
    (setter x-setter)
    )
)

; Instructions.

; Define an instruction object, normal version.
; At present all fields must be specified.
; Fields ifield-assertion is absent.

(define-pmacro (define-normal-insn name comment attrs syntax fmt semantics timing)
  "Define a normal instruction."
  (define-full-insn name comment attrs syntax fmt () semantics timing)
)

; To reduce the amount of typing.
; Note that this is the same name as the D'ni in MYST.  Oooohhhh.....
; this must be the right way to go. :-)

(define-pmacro dni
  "Shorthand form of define-normal-insn."
  define-normal-insn
)

; Macro instructions.

; Define a macro-insn object, normal version.
; This only supports expanding to one real insn.

(define-pmacro (define-normal-macro-insn name comment attrs syntax expansion)
  "Define a normal macro instruction."
  (define-full-minsn name comment attrs syntax expansion)
)

; To reduce the amount of typing.

(define-pmacro dnmi
  "Shorthand form of define-normal-macro-insn."
  define-normal-macro-insn
)

; Modes.
; ??? Not currently available for use.
;
; Define Normal Mode
;
;(define-pmacro (define-normal-mode name comment attrs bits bytes
;		 non-mode-c-type printf-type sem-mode ptr-to host?)
;  "Define a normal mode.\n"
;  (define-full-mode name comment attrs bits bytes
;    non-mode-c-type printf-type sem-mode ptr-to host?)
;)
;
; For those who don't like typing.
;(define-pmacro dnm
;  "Shorthand form of define-normal-mode.\n"
;  define-normal-mode
;)
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@import 7.3.1
@
text
@@


1.1.1.1.8.1
log
@Rebase to HEAD as of a few days ago.
@
text
@@


1.1.1.1.2.1
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@@

