; SuperH SHcompact instruction set description.  -*- Scheme -*-
; Copyright (C) 2006 Red Hat, Inc.
; This file is part of CGEN.
; See file COPYING.CGEN for details.

; Syntax for "delay" is different for SID vs SIM.
(define-pmacro (set-delay del targ src)
   (set (delay del targ) src)
)

; SID uses parallel insns to implement "delay",
(define-pmacro (isa-parallel-insns n)
  (parallel-insns n)
)

; Call save_delayed_pc for SID.
(define-pmacro (save-delayed-pc disp)
  (c-call VOID "save_delayed_pc" disp)
)

; Call save_branch_prediction for SID.
(define-pmacro (save-branch-prediction tra likely)
  (c-call "save_branch_prediction" tra likely)
)

; Call save_branch_optimization for SID.
(define-pmacro (save-branch-optimization likely)
  (c-call "save_branch_optimization" likely)
)

; Call sh64_save_cfg_address for SID.
(define-pmacro (save-cfg-address address)
  (c-call "sh64_save_cfg_address" address)
)

; For making profiling calls and dynamic configuration.
(define-pmacro (cg-profile caller callee)
  (c-call "cg_profile" caller callee)
)
(define-pmacro (cg-profile-delay caller callee delay)
  (c-call "cg_profile" caller callee delay)
)
(define-pmacro (notify-ret pr)
  (c-call VOID "notify_ret" pr)
)
; For dynamic configuration only.
(define-pmacro (cg-profile-jump caller callee)
  (c-call "cg_profile_jump" caller callee)
)
