+2009-04-20 DJ Delorie <dj@redhat.com>
+
+ * intrinsics.scm (intrinsics-analyze!): Include aliases.
+ (guess-mode): Drop COP* syntax.
+ (need-insn): Add "--syscall--" to the list.
+ (enum-type): Drop COP* syntax.
+ (intrinsics.h): Likewise.
+ (intrinsic-protos.h): Change file header to allow it to be
+ included.
+
2009-04-17 DJ Delorie <dj@redhat.com>
* cpu/mep-c5.cpu (f-12s20): Change to signed.
(define (intrinsics-analyze!)
(arch-analyze-insns! CURRENT-ARCH
- #f ; don't include aliases
+ #t ; include aliases
#t) ; do analyze the semantics
)
(cond
((equal? (md-operand:cdata op) 'FMAX_INT) "SI")
((equal? (md-operand:cdata op) 'FMAX_FLOAT) "SF")
- ((is-h-cr64? (md-operand:hw op)) "COPDI")
- ((is-h-cr? (md-operand:hw op)) "COPSI")
+ ((is-h-cr64? (md-operand:hw op)) "DI")
+ ((is-h-cr? (md-operand:hw op)) "SI")
((not (memory? (md-operand:type op))) "SI")
(else #f)))
;; Return true if the given insn should be included in the output files.
(define (need-insn? insn)
- (not (member (insn-mnemonic insn) '("--unused--" "--reserved--"))))
+ (not (member (insn-mnemonic insn) '("--unused--" "--reserved--" "--syscall--"))))
;; Set up global variables, if we haven't already.
(define (analyze-intrinsics!)
(define (enum-type op)
(cond
- ((is-h-cr64? (md-operand:hw op)) "cgen_regnum_operand_type_COPDI")
- ((is-h-cr? (md-operand:hw op)) "cgen_regnum_operand_type_COPSI")
+ ((is-h-cr64? (md-operand:hw op)) "cgen_regnum_operand_type_DI")
+ ((is-h-cr? (md-operand:hw op)) "cgen_regnum_operand_type_SI")
(else
(case (md-operand:cdata op)
((POINTER) "cgen_regnum_operand_type_POINTER")
" cgen_regnum_operand_type_USHORT, /* unsigned short */\n"
" cgen_regnum_operand_type_CHAR, /* char */\n"
" cgen_regnum_operand_type_UCHAR, /* unsigned char */\n"
- " cgen_regnum_operand_type_COPSI, /* __cop long */\n"
- " cgen_regnum_operand_type_COPDI, /* __cop long long */\n"
+ " cgen_regnum_operand_type_SI, /* __cop long */\n"
+ " cgen_regnum_operand_type_DI, /* __cop long long */\n"
" cgen_regnum_operand_type_CP_DATA_BUS_INT, /* cp_data_bus_int */\n"
" cgen_regnum_operand_type_DEFAULT = cgen_regnum_operand_type_LONG\n"
"};\n"
(else "long"))
(if (and (not (equal? (md-operand:cdata op) 'REGNUM))
(md-operand:write-index op))
- "&" "")))
+ "*" "")))
(define (intrinsic-protos.h) ; i.e., intrinsics.h
(string-write
"\n\n"
"/* DO NOT EDIT: This file is automatically generated by CGEN.\n"
" Any changes you make will be discarded when it is next regenerated.\n"
- "\n"
- " FURTHERMORE: this file serves only as documentation and must not be included\n "
- " in any application code which wishes to use intrinsics. */\n"
- "\n\n"
- "#error \"This file must not be included in any application code which uses intrinsics.\"\n"
- "#error \"It is here for documentation purposes ONLY.\"\n"
- "\n\n"
+ "*/\n\n"
"#if __MEP_CONFIG_CP_DATA_BUS_WIDTH == 64\n"
" typedef long long cp_data_bus_int;\n"
"#else\n"