; $Id: testerr_0150_Terror_fpp.mac 1184 2019-07-10 20:39:44Z mueller $
; SPDX-License-Identifier: GPL-3.0-or-later
; Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
;
; test T error code (trunction)
; fpp cases:  fpp ac reg>3
;
        .asect
        .blkw   400

a:      .word   0,0
        .word   0,0

; r0:r3 ok as fpp ac
; r4:r7 forbidden as fpp ac

; test with gr type opcode, here addf

        addf    a,r0
        addf    a,r1
        addf    a,r2
        addf    a,r3

        addf    a,r4            ;;!! T
        addf    a,r5            ;;!! T
        addf    a,sp            ;;!! T
        addf    a,pc            ;;!! T

; test with rg type opcode, here stf

        stf     r0,a
        stf     r1,a
        stf     r2,a
        stf     r3,a

        stf     r4,a            ;;!! T
        stf     r5,a            ;;!! T
        stf     sp,a            ;;!! T
        stf     pc,a            ;;!! T

; for fsrc and fdst only register 0-5
; are allowed, but the assembler doesn't
; check for this.

; test with mulf

        mulf    r0,r0
        mulf    r1,r0
        mulf    r2,r0
        mulf    r3,r0
        mulf    r4,r0
        mulf    r5,r0

        mulf    sp,r0           ; ok, but traps
        mulf    pc,r0           ; ok, but traps

; test with stf

        stf     r0,r0
        stf     r0,r1
        stf     r0,r2
        stf     r0,r3
        stf     r0,r4
        stf     r0,r5

        stf     r0,sp            ; ok, but traps
        stf     r0,pc            ; ok, but traps

        .end
