brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.1 KiB · 54f4162 Raw
117 lines · plain
1! RUN: llvm-mc %s -triple=sparc   -show-encoding | FileCheck %s --check-prefixes=CHECK,V82! RUN: llvm-mc %s -triple=sparcv9 -show-encoding | FileCheck %s --check-prefixes=CHECK,V93 4        ! CHECK: rd %y, %i0            ! encoding: [0xb1,0x40,0x00,0x00]5        rd %y, %i06 7        ! CHECK: rd %asr1, %i0         ! encoding: [0xb1,0x40,0x40,0x00]8        rd %asr1, %i09 10        ! CHECK: wr %i0, 5, %y         ! encoding: [0x81,0x86,0x20,0x05]11        wr %i0, 5, %y12 13        ! CHECK: wr %i0, %i1, %asr15   ! encoding: [0x9f,0x86,0x00,0x19]14        wr %i0, %i1, %asr1515 16        ! CHECK: rd %asr15, %g0        ! encoding: [0x81,0x43,0xc0,0x00]17        rd %asr15, %g018 19        ! CHECK: rd %psr, %i0          ! encoding: [0xb1,0x48,0x00,0x00]20        rd %psr, %i021 22        ! CHECK: rd %wim, %i0          ! encoding: [0xb1,0x50,0x00,0x00]23        rd %wim, %i024 25        ! CHECK: rd %tbr, %i0          ! encoding: [0xb1,0x58,0x00,0x00]26        rd %tbr, %i027 28        ! CHECK: wr %i0, 5, %psr          ! encoding: [0x81,0x8e,0x20,0x05]29        wr %i0, 5, %psr30 31        ! CHECK: wr %i0, 5, %wim          ! encoding: [0x81,0x96,0x20,0x05]32        wr %i0, 5, %wim33 34        ! CHECK: wr %i0, 5, %tbr          ! encoding: [0x81,0x9e,0x20,0x05]35        wr %i0, 5, %tbr36 37        ! CHECK: ld [%g2+20], %fsr     ! encoding: [0xc1,0x08,0xa0,0x14]38        ld [%g2 + 20],%fsr39 40        ! CHECK: ld [%g2+%i5], %fsr    ! encoding: [0xc1,0x08,0x80,0x1d]41        ld [%g2 + %i5],%fsr42 43        ! CHECK: st %fsr, [%g2+20]     ! encoding: [0xc1,0x28,0xa0,0x14]44        st %fsr,[%g2 + 20]45 46        ! CHECK: st %fsr, [%g2+%i5]    ! encoding: [0xc1,0x28,0x80,0x1d]47        st %fsr,[%g2 + %i5]48 49        ! CHECK: std %fq, [%g6+%i2]    ! encoding: [0xc1,0x31,0x80,0x1a]50        std %fq, [%g6 + %i2]51 52!! Those instructions are processed differently on V8 and V9.53 54! V8: rd %asr2, %i0         ! encoding: [0xb1,0x40,0x80,0x00]55! V9: rd %ccr, %i0          ! encoding: [0xb1,0x40,0x80,0x00]56rd %asr2, %i057! V8: wr %i0, 7, %asr2      ! encoding: [0x85,0x86,0x20,0x07]58! V9: wr %i0, 7, %ccr       ! encoding: [0x85,0x86,0x20,0x07]59wr %i0, 7, %asr260 61! V8: rd %asr3, %i0         ! encoding: [0xb1,0x40,0xc0,0x00]62! V9: rd %asi, %i0          ! encoding: [0xb1,0x40,0xc0,0x00]63rd %asr3, %i064! V8: wr %i0, 7, %asr3      ! encoding: [0x87,0x86,0x20,0x07]65! V9: wr %i0, 7, %asi       ! encoding: [0x87,0x86,0x20,0x07]66wr %i0, 7, %asr367 68! V8: rd %asr4, %i0         ! encoding: [0xb1,0x41,0x00,0x00]69! V9: rd %tick, %i0         ! encoding: [0xb1,0x41,0x00,0x00]70rd %asr4, %i071! V8: wr %i0, 7, %asr4      ! encoding: [0x89,0x86,0x20,0x07]72! V9: wr %i0, 7, %tick      ! encoding: [0x89,0x86,0x20,0x07]73wr %i0, 7, %asr474 75! V8: rd %asr5, %i0         ! encoding: [0xb1,0x41,0x40,0x00]76! V9: rd %pc, %i0           ! encoding: [0xb1,0x41,0x40,0x00]77rd %asr5, %i078! V8: wr %i0, 7, %asr5      ! encoding: [0x8b,0x86,0x20,0x07]79! V9: wr %i0, 7, %pc        ! encoding: [0x8b,0x86,0x20,0x07]80wr %i0, 7, %asr581 82! V8: rd %asr6, %i0         ! encoding: [0xb1,0x41,0x80,0x00]83! V9: rd %fprs, %i0         ! encoding: [0xb1,0x41,0x80,0x00]84rd %asr6, %i085! V8: wr %i0, 7, %asr6      ! encoding: [0x8d,0x86,0x20,0x07]86! V9: wr %i0, 7, %fprs      ! encoding: [0x8d,0x86,0x20,0x07]87wr %i0, 7, %asr688 89!! Alternate names for %asr2-%asr6 are only for V9.90!! TODO: make sure that using alternate names returns91!! an error on V8 (currently it doesn't, see SparcRegisterInfo.td).92 93! V9: rd %ccr, %i0          ! encoding: [0xb1,0x40,0x80,0x00]94rd %ccr, %i095! V9: wr %i0, 7, %ccr       ! encoding: [0x85,0x86,0x20,0x07]96wr %i0, 7, %ccr97 98! V9: rd %asi, %i0          ! encoding: [0xb1,0x40,0xc0,0x00]99rd %asi, %i0100! V9: wr %i0, 7, %asi       ! encoding: [0x87,0x86,0x20,0x07]101wr %i0, 7, %asi102 103! V9: rd %tick, %i0         ! encoding: [0xb1,0x41,0x00,0x00]104rd %tick, %i0105! V9: wr %i0, 7, %tick      ! encoding: [0x89,0x86,0x20,0x07]106wr %i0, 7, %tick107 108! V9: rd %pc, %i0           ! encoding: [0xb1,0x41,0x40,0x00]109rd %pc, %i0110! V9: wr %i0, 7, %pc        ! encoding: [0x8b,0x86,0x20,0x07]111wr %i0, 7, %pc112 113! V9: rd %fprs, %i0         ! encoding: [0xb1,0x41,0x80,0x00]114rd %fprs, %i0115! V9: wr %i0, 7, %fprs      ! encoding: [0x8d,0x86,0x20,0x07]116wr %i0, 7, %fprs117