* ========== Copyright Header Begin ==========================================
* OpenSPARC T2 Processor File: ffu_blkst_stall_n2.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 ============================================
#define DMMU_SKIP_IF_NO_TTE
#define MAIN_PAGE_HV_ALSO
#define MAIN_PAGE_NUCLEUS_ALSO
#define ENABLE_T0_Clean_Window_0x24
#define ENABLE_T0_Corrected_ECC_error_0x63
#define ENABLE_T0_Data_Access_Exception_0x30
#define ENABLE_T0_Data_access_error_0x32
#define ENABLE_T0_Division_By_Zero_0x28
#define ENABLE_T0_Fp_disabled_0x20
#define ENABLE_T0_Fp_exception_ieee_754_0x21
#define ENABLE_T0_Fp_exception_other_0x22
#define ENABLE_T0_Illegal_instruction_0x10
#define ENABLE_T0_Instruction_Access_MMU_Miss_0x09
#define ENABLE_T0_Instruction_access_error_0x0a
#define ENABLE_T0_Instruction_access_exception_0x08
#define ENABLE_T0_Lddf_Mem_Address_Not_Aligned_0x35
#define ENABLE_T0_Mem_Address_Not_Aligned_0x34
#define ENABLE_T0_Privileged_Action_0x37
#define ENABLE_T0_Privileged_opcode_0x11
#define ENABLE_T0_Stdf_Mem_Address_Not_Aligned_0x36
#define ENABLE_T0_Tag_Overflow_0x23
#define ENABLE_T0_Unimplemented_LDD_0x12
#define ENABLE_T0_Unimplemented_STD_0x13
#define ENABLE_T0_data_access_protection_0x6c
#define ENABLE_T0_fast_data_access_MMU_miss_0x68
#define ENABLE_T0_fast_instr_access_MMU_miss_0x64
th_fork(th_main,%l0) ! start up to four threads.
! All threads run the same code with different data.
rd %asi,%g1 ! current value of asi reg
! these reads are just for debugging information
// add ASI_PRIMARY_CONTEXT_REG_VAL,%g0,%i0
// ldxa [%i0]ASI_PRIMARY_CONTEXT_REG,%i1 ! value of primary context
// add ASI_SECONDARY_CONTEXT_REG_VAL,%g0,%i2
// ldxa [%i2]ASI_SECONDARY_CONTEXT_REG,%i3 ! secondary context
! and now back to our regularly scheduled testing
setx target0_primary,%l0,%g2
stda %f0, [%l1]ASI_BLOCK_AS_IF_USER_PRIMARY
stda %f16,[%l2]ASI_BLOCK_AS_IF_USER_PRIMARY
stda %f0, [%l3]ASI_BLOCK_AS_IF_USER_PRIMARY
stda %f16,[%l4]ASI_BLOCK_AS_IF_USER_PRIMARY
stda %f0, [%l5]ASI_BLOCK_AS_IF_USER_PRIMARY
stda %f16,[%l6]ASI_BLOCK_AS_IF_USER_PRIMARY
stda %f0, [%l7]ASI_BLOCK_AS_IF_USER_PRIMARY
stda %f16,[%i0]ASI_BLOCK_AS_IF_USER_PRIMARY
stda %f0, [%i1]ASI_BLOCK_AS_IF_USER_PRIMARY
stda %f16,[%i2]ASI_BLOCK_AS_IF_USER_PRIMARY
stda %f0, [%i3]ASI_BLOCK_AS_IF_USER_PRIMARY
stda %f16,[%i4]ASI_BLOCK_AS_IF_USER_PRIMARY
! do it again with secondary space. FFU does not care, but what the heck...
setx target0_secondary,%l0,%g2
stda %f0, [%l1]ASI_BLOCK_AS_IF_USER_SECONDARY
stda %f16,[%l2]ASI_BLOCK_AS_IF_USER_SECONDARY
stda %f0, [%l3]ASI_BLOCK_AS_IF_USER_SECONDARY
stda %f16,[%l4]ASI_BLOCK_AS_IF_USER_SECONDARY
stda %f0, [%l5]ASI_BLOCK_AS_IF_USER_SECONDARY
stda %f16,[%l6]ASI_BLOCK_AS_IF_USER_SECONDARY
stda %f0, [%l7]ASI_BLOCK_AS_IF_USER_SECONDARY
stda %f16,[%i0]ASI_BLOCK_AS_IF_USER_SECONDARY
stda %f0, [%i1]ASI_BLOCK_AS_IF_USER_SECONDARY
stda %f16,[%i2]ASI_BLOCK_AS_IF_USER_SECONDARY
stda %f0, [%i3]ASI_BLOCK_AS_IF_USER_SECONDARY
stda %f16,[%i4]ASI_BLOCK_AS_IF_USER_SECONDARY
! let the other threads finish gracefully
! create a large load of integer stores using three threads
ldx [%g1],%l0 ! thread 0 writes to this addr to end test
!==========================
stop_flag: .word 0xffffffff, 0xffffffff
float_data: .word 0x3fe80000, 0x12345678
!*************************************************
!*************************************************
.global target0_secondary