* ========== Copyright Header Begin ==========================================
* OpenSPARC T2 Processor File: spc_mul_ldst.s
* Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved
* 4150 Network Circle, Santa Clara, California 95054, U.S.A.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* 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; version 2 of the License.
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* For the avoidance of doubt, and except that if any non-GPL license
* choice is available it will apply instead, Sun elects to use only
* the General Public License version 2 (GPLv2) at this time for any
* software where a choice of GPL license versions is made
* available with the language indicating that GPLv2 or any later version
* may be used, or where a choice of which version of the GPL is applied is
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* ========== Copyright Header End ============================================
setx DIAG_DATA_AREA, %g1, %g3
INIT_TH_FP_REG(%l7, %f0, 0x55555555aaaaaaaa)
INIT_TH_FP_REG(%l7, %f2, 0xaaaaaaaa55555555)
INIT_TH_FP_REG(%l7, %f4, 0xfedcba9876543210)
INIT_TH_FP_REG(%l7, %f6, 0x0123456789abcdef)
INIT_TH_FP_REG(%l7, %f8, 0x55aa55aaff00ff00)
INIT_TH_FP_REG(%l7, %f10, 0x1111111111111111)
INIT_TH_FP_REG(%l7, %f12, 0x8888888888888888)
INIT_TH_FP_REG(%l7, %f14, 0xfedcba9876543210)
********************************
********************************
!!-----------------------
!!-----------------------
branch_nt_no_annul_start:
! remove annull bit since it does not affect diag correctness
! and it gives me an extra performance case to test - JSG
branch_nt_annul_icache_start:
branch_nt_annul_icache_end:
!!------------------------------------
!! sdivx ( signed divide )
!!------------------------------------
sub %l0, 3, %l3 /* l3 = -3 */
sub %l0, 3, %l3 /* l3 = -3 */
sub %l0, 27, %l5 /* l5 = -27 */
!!------------------------------------
!!------------------------------------
sub %l0, 3, %l3 /* l3 = 0xfffffffffffffffd */
udivx %l5, %l3, %l6 /* l6 = l5/l3 = 0 round */
sub %l0, 3, %l3 /* l3 = 0xfffffffffffffffd */
sub %l0, 27, %l5 /* l5 = 0xffffffffffffffe5 */
udivx %l5, %l3, %l6 /* l6 = l5/l3 = 0 rounded */
!!-----------------------
!!-----------------------
!!-----------------------
!!-----------------------
!!-----------------------
!!-----------------------
umulcc %l3, %l0, %l2 /* Z set */
umulcc %l3, %l4, %l2 /* icc.N set */
umulcc %l3, %l4, %l2 /* XCC.N set */
!!-----------------------
!!-----------------------
smulcc %l3, %l0, %l2 /* Z set */
smulcc %l3, %l4, %l2 /* icc.N set */
smulcc %l3, %l4, %l2 /* XCC.N set */
smulcc %l3, %l5, %l6 /* icc.N set */
*********************************
*********************************
sethi %hi(0xabcd1234), %l1
sethi 0x0, %l0 /* like a nop */
*********************************
*********************************
setx 0x7fffffff80000000, %l0, %l2
setx 0xffffffff00000000, %l0, %l2
setx 0x8000000000000000, %l0, %l2
setx 0x8000000000000000, %l0, %l1
setx 0x8000000000000000, %l0, %l1
setx 0xffffffffffffffff, %l3, %l4
setx 0x8000000000000000, %l0, %l1
setx 0xffffffffffffffff, %l0, %l4
setx 0x8000000000000000, %l0, %l1
setx 0xffffffff80000000, %l0, %l5
***************************
***************************
!!------------------------
!!------------------------
setx ldfsr_sdata, %l0, %l2
ld [%l2+%l0], %fsr /* %fcc0 = 10 fs1 > fs2 */
ld [%l2+%l0], %fsr /* %fcc0 = 01 fs1 < fs2 */
ld [%l2+%l0], %fsr /* %fcc0 = 00 fs1 = fs2 */
!!------------------------
!!------------------------
setx ldfsr_ddata, %l0, %l2
ldx [%l2+%l0], %fsr /* %fcc0 = 10 fs1 > fs2 */
ldx [%l2+%l0], %fsr /* %fcc0 = 01 fs1 < fs2 */
ldx [%l2+%l0], %fsr /* %fcc0 = 00 fs1 = fs2 */
*********************************
*********************************
/* load the fp data from the memory */
setx fps_cvt_nmd1, %l0, %l1
ld [%l1+%l0], %f0 /* f0 = 2 * (1+1/2) */
ld [%l1+%l0], %f2 /* f2 = 4 * (1+1/2) */
ld [%l1+%l0], %f4 /* f4 = 8 * (1+1/8) */
setx fpd_cvt_nmd1, %l0, %l1
ldd [%l1+%l0], %f6 /* f6 = 2 * (1+1/2) */
ldd [%l1+%l0], %f8 /* f8 = 4 * (1+1/2) */
ldd [%l1+%l0], %f10 /* f10 = 8 * (1+1/8) */
ldd [%l1+%l0], %f12 /* f12 = 32 * (1+1/8) = 36 */
!!--------------------------
!!--------------------------
setx stfsr_sdata, %l0, %l2
ld [%l2+%l0], %f14 /* f14 should = f0 */
ld [%l2+%l0], %f16 /* f16 should = f2 */
!!--------------------------
!!--------------------------
setx stfsr_ddata, %l0, %l2
ldd [%l2+%l0], %f14 /* f14 should = f8 */
ldd [%l2+%l0], %f16 /* f16 should = f10 */
!!--------------------------
!!--------------------------
setx ldfsr_sdata, %l0, %l2
ld [%l2+%l0], %fsr /* %fcc0 = 10 fs1 > fs2 */
setx stfsr_sdata, %l0, %l2
!!--------------------------
!!--------------------------
setx ldfsr_ddata, %l0, %l2
ldx [%l2+%l0], %fsr /* %fcc0 = 10 fs1 > fs2 */
setx stfsr_ddata, %l0, %l2
********************************
********************************
********************************
********************************
ldint_1: .word 0x55aa11bb
fst_data: .xword 0x700f000000000000
.xword 0x700f000000000000
.xword 0x700ff00000000000
.xword 0x700ff00000000000
stfsr_sdata: .word 0x00000000
stfsr_ddata: .xword 0x0000000000000000
.xword 0x0000000000000000
.xword 0x0000000000000000
.xword 0x0000000000000000
stfps_nmdata: .word 0x00000000
stfpd_nmdata: .xword 0x0000000000000000
.xword 0x0000000000000000
.xword 0x0000000000000000
.xword 0x0000000000000000
stint_1: .word 0x00000000
stint_asi1: .word 0x00000000
stint_asi2: .word 0x00000000
ldfsr_sdata: .word 0x00000800
ldfsr_ddata: .xword 0x0000000000000800
.xword 0x0000000000000400
.xword 0x0000000000000000
.xword 0x0000000000000c00
fps_data: .word 0x00200000
fps_nmdata: .word 0x70200000
fpd_data: .xword 0x0002000000000000
.xword 0x0004000000000000
.xword 0x0006000000000000
.xword 0x0008000000000000
fpd_nmdata: .xword 0x7002000000000000
.xword 0x7004000000000000
.xword 0x700b000000000000
.xword 0x700b000000000000
fpquad_data: .xword 0x0000200000000000
.xword 0x0000000000000000
.xword 0x0000400000000000
.xword 0x0000000000000000
.xword 0x0000600000000000
.xword 0x0000000000000000
.xword 0x0000800000000000
.xword 0x0000000000000000
fpquad_nmdata: .xword 0x7000200000000000
.xword 0x0000000000000000
.xword 0x7000400000000000
.xword 0x0000000000000000
.xword 0x7000b00000000000
.xword 0x0000000000000000
.xword 0x7000b00000000000
.xword 0x0000000000000000
fps_cvt_data1: .word 0x00200000
fps_cvt_nmd1: .word 0x40400000 /* 3 */
.word 0x42100000 /* 36 */
fpd_cvt_data1: .xword 0x0002000000000000
.xword 0x0004000000000000
.xword 0x0006000000000000
.xword 0x0008000000000000
fpd_cvt_nmd1: .xword 0x4008000000000000 /* 3 */
.xword 0x4018000000000000 /* 6 */
.xword 0x4022000000000000 /* 9 */
.xword 0x4042000000000000 /* 36 */
int2fps_nmd1: .word 0x00000003
int2fpd_nmd1: .xword 0x0000000000000003
.xword 0x0000000000000006
.xword 0x0000000000000009
.xword 0x0000000000000000
fps_muldv_nmd1: .word 0x40400000 /* 3 */
.word 0x41900000 /* 18 = 16*(1+1/8) */
.word 0x42100000 /* 36 */
fpd_muldv_nmd1: .xword 0x4008000000000000 /* 3 */
.xword 0x4018000000000000 /* 6 */
.xword 0x4032000000000000 /* 18 */
.xword 0x4042000000000000 /* 36 */
fps_sqr_nmd1: .word 0x40400000 /* 3 */
.word 0x41100000 /* 9 = 8*(1+1/8) */
.word 0x42100000 /* 36 = 32*(1+1/8) */
fpd_sqr_nmd1: .xword 0x4008000000000000 /* 3 */
.xword 0x4018000000000000 /* 6 */
.xword 0x4022000000000000 /* 9 */
.xword 0x4042000000000000 /* 36 */