// My custom weight file template.
// Weights available are : wt_hig, wt_med, wt_low, wt_nul
inst: trap_asr %rvar wt_low
| ldstasi_excp %rvar wt_med
| ldstasi_excp_z %rvar wt_med
| change_mode %rvar wt_low
| splash_fprs %rvar wt_low
| splash_pstate %rvar wt_med
| splash_hpstate %rvar wt_med
| splash_cwp %rvar wt_nul
| splash_tick %rvar wt_med
| splash_cmpr %rvar wt_med
| splash_tba %rvar wt_med
| splash_htba %rvar wt_low
| splash_lsucnt %rvar wt_high
//| splash_decr %rvar wt_nul
stress : uLONG %ropr Ro_ldst_ptr | uBLK14 %ropr Ro_blksts | memptr_st
stress2 : intvec_st | uDBG3 %ropr Ro_ldst_ptr | uBLK14 %ropr Ro_blksts | loopz
IJ_printf(th_stress, "memptr_%y_%d:\n", label);
IJ_printf(th_stress, "\tset user_data_start, %%r31\n", Rv_memptr);
IJ_printf(th_stress, "\tset 0x%rx, %%r31\n", Rv_memptr);
IJ_printf(th_stress, "\tnop\n\tnop\n\trd %%tick, %%r28\n");
IJ_printf(th_stress, "#if (defined PORTABLE_CORE || MAX_THREADS == 8)\n");
IJ_printf(th_stress, "\tsethi %%hi(0x3800), %%r27\n\tandn %%r28, %%r27, %%r28\n");
IJ_printf(th_stress, "#ifdef PORTABLE_CORE\n\t! Add CID to vector\n");
IJ_printf(th_stress, "\tta T_CHANGE_HPRIV\n");
IJ_printf(th_stress, "\tldxa [%%g0]0x63, %%r27\n\tsllx %%r27, 8, %%r27\n");
IJ_printf(th_stress, "\tor %%r27, %%r28, %%r28 \n#endif\n");
IJ_printf(th_stress, "\twrhpr %%g0, 0x%rx, %%hpstate ! ta T_CHANGE_NONHPRIV\n",Rv_wrhp_nonhp);
IJ_printf(th_stress, "#endif\n");
IJ_printf(th_stress, "\tsethi %%hi(0x30000), %%r27\n");
IJ_printf(th_stress, "\tandn %%r28, %%r27, %%r28\n");
IJ_printf(th_stress, "\tta T_CHANGE_HPRIV\n");
IJ_printf(th_stress, "\tstxa %%r28, [%%g0] 0x73\n");
IJ_printf(th_stress, "\tnop\n\tnop\n\tset 0x%x, %%r28\n", IJ_get_rvar_val32(Rv_intdisvec));
IJ_printf(th_stress, "#if (defined PORTABLE_CORE || MAX_THREADS == 8)\n");
IJ_printf(th_stress, "\tsethi %%hi(0x3800), %%r27\n\tandn %%r28, %%r27, %%r28\n");
IJ_printf(th_stress, "#ifdef PORTABLE_CORE\n\t! Add CID to vector\n");
IJ_printf(th_stress, "\tta T_CHANGE_HPRIV\n");
IJ_printf(th_stress, "\tldxa [%%g0]0x63, %%r27\n\tsllx %%r27, 8, %%r27\n");
IJ_printf(th_stress, "\tor %%r27, %%r28, %%r28 \n#endif\n");
IJ_printf(th_stress, "\twrhpr %%g0, 0x%rx, %%hpstate ! ta T_CHANGE_NONHPRIV\n",Rv_wrhp_nonhp);
IJ_printf(th_stress, "#endif\n" );
IJ_printf(th_stress, "\tstxa %%r28, [%%g0] 0x73\n");
IJ_generate_from_token(1, th_stress, ijdefault, uDIFFD);
IJ_printf(th_stress, "intvec_st_%y_%d:\n", label);