lhv1.s 8.47 KB
/****************************************************************
  This program tests the instruction: lhv
 ****************************************************************/

#include "suregre.h"

.base 0x04001000

	.data	0x04000000
	.word	0x01820384
	.word	0x85068708
	.word	0x098A0B8C
	.word	0x8D0E8F10
	.word	0x11921394
	.word	0x95169718
	.word	0x199A1B9C
	.word	0x9D1E9F20
	.word	0x21A223A4
	.word	0xA526A728
	.word	0x29AA2BAC
	.word	0xAD2EAF30
	.word	0x31B233B4
	.word	0xB536B738
	.word	0x39BA3BBC
	.word	0xBD3EBF40
	.word	0x41C243C4
	.word	0xC546C748
	.word	0x49CA4BCC
	.word	0xCD4ECF50
	.word	0x51D253D4
	.word	0xD556D758
	.word	0x59DA5BDC
	.word	0xDD5EDF60
	.word	0x61E263E4
	.word	0xE566E768
	.word	0x69EA6BEC
	.word	0xED6EEF70
	.word	0x71F273F4
	.word	0xF576F778
	.word	0x79FA7BFC
	.word	0xFD7E0080

	LI(r0 , 0xFFFF, 0xFFFF);
	LI(r1 , 0x0101, 0x0101);
	LI(r2 , 0x0202, 0x0202);
	LI(r3 , 0x0303, 0x0303);
	LI(r4 , 0x0404, 0x0404);
	LI(r5 , 0x0505, 0x0505);
	LI(r6 , 0x0606, 0x0606);
	LI(r7 , 0x0707, 0x0707);
	LI(r8 , 0x0808, 0x0808);
	LI(r9 , 0x0909, 0x0909);
	LI(r10, 0x0A0A, 0x0A0A);
	LI(r11, 0x0B0B, 0x0B0B);
	LI(r12, 0x0C0C, 0x0C0C);
	LI(r13, 0x0D0D, 0x0D0D);
	LI(r14, 0x0E0E, 0x0E0E);
	LI(r15, 0x0F0F, 0x0F0F);
	LI(r16, 0x1010, 0x1010);
	LI(r17, 0x1111, 0x1111);
	LI(r18, 0x1212, 0x1212);
	LI(r19, 0x1313, 0x1313);
	LI(r20, 0x1414, 0x1414);
	LI(r21, 0x1515, 0x1515);
	LI(r22, 0x1616, 0x1616);
	LI(r23, 0x1717, 0x1717);
	LI(r24, 0x1818, 0x1818);
	LI(r25, 0x1919, 0x1919);
	LI(r26, 0x1A1A, 0x1A1A);
	LI(r27, 0x1B1B, 0x1B1B);
	LI(r28, 0x1C1C, 0x1C1C);
	LI(r29, 0x1D1D, 0x1D1D);
	LI(r30, 0x1E1E, 0x1E1E);
	LI(r31, 0x1F1F, 0x1F1F);
	lqv	v0[0], 0 (r0);
	vxor	v0 , v0, v0
	vxor	v1 , v0, v0
	vxor	v2 , v0, v0
	vxor	v3 , v0, v0
	vxor	v4 , v0, v0
	vxor	v5 , v0, v0
	vxor	v6 , v0, v0
	vxor	v7 , v0, v0
	vxor	v8 , v0, v0
	vxor	v9 , v0, v0
	vxor	v10, v0, v0
	vxor	v11, v0, v0
	vxor	v12, v0, v0
	vxor	v13, v0, v0
	vxor	v14, v0, v0
	vxor	v15, v0, v0
	vxor	v16, v0, v0
	vxor	v17, v0, v0
	vxor	v18, v0, v0
	vxor	v19, v0, v0
	vxor	v20, v0, v0
	vxor	v21, v0, v0
	vxor	v22, v0, v0
	vxor	v23, v0, v0
	vxor	v24, v0, v0
	vxor	v25, v0, v0
	vxor	v26, v0, v0
	vxor	v27, v0, v0
	vxor	v28, v0, v0
	vxor	v29, v0, v0
	vxor	v30, v0, v0
	vxor	v31, v0, v0

	.word	0x20802180
	.word	0x62806380
	.word	0x24802580
	.word	0x66806780

	ChkVld( 1,lhv,r3 ,r4 ,r5 ,r2 ,v1 ,v0 ,0x0400,0x0080,0x0400,0x0040,0x0000,e0 ,0x00FF)

	.word	0x28802980
	.word	0x6A806B80
	.word	0x2C802D80
	.word	0x6E806F80

	ChkVld( 2,lhv,r4 ,r5 ,r6 ,r3 ,v2 ,v1 ,0x0400,0x0090,0x0400,0x0040,0x0010,e0 ,0x00FF)

	.word	0x18801980
	.word	0x5A805B80
	.word	0x1C801D80
	.word	0x5E805F80

	ChkVld( 3,lhv,r5 ,r6 ,r7 ,r4 ,v3 ,v2 ,0x0400,0x00A0,0x0400,0x0040,0xFFF0,e0 ,0x00FF)

	.word	0x38803980
	.word	0x7A807B80
	.word	0x3C803D80
	.word	0x7E800000

	ChkVld( 4,lhv,r6 ,r7 ,r8 ,r5 ,v4 ,v3 ,0x0400,0x00B0,0x0400,0x0040,0x0030,e0 ,0x00FF)

	.word	0x00800180
	.word	0x42804380
	.word	0x04800580
	.word	0x46804780

	ChkVld( 5,lhv,r7 ,r8 ,r9 ,r6 ,v5 ,v4 ,0x0400,0x00C0,0x0400,0x0040,0xFFC0,e0 ,0x00FF)

	.word	0x61006200
	.word	0x23002400
	.word	0x65006600
	.word	0x27002800

	ChkVld( 6,lhv,r8 ,r9 ,r10,r7 ,v6 ,v5 ,0x0400,0x00D0,0x0400,0x0041,0x0000,e0 ,0x00FF)

	.word	0x69006A00
	.word	0x2B002C00
	.word	0x6D006E00
	.word	0x2F003000

	ChkVld( 7,lhv,r9 ,r10,r11,r8 ,v7 ,v6 ,0x0400,0x00E0,0x0400,0x0041,0x0010,e0 ,0x00FF)

	.word	0x59005A00
	.word	0x1B001C00
	.word	0x5D005E00
	.word	0x1F002000

	ChkVld( 8,lhv,r10,r11,r12,r9 ,v8 ,v7 ,0x0400,0x00F0,0x0400,0x0041,0xFFF0,e0 ,0x00FF)

	.word	0x79007A00
	.word	0x3B003C00
	.word	0x7D007E00
	.word	0x3F004000

	ChkVld( 9,lhv,r11,r12,r13,r10,v9 ,v8 ,0x0400,0x0100,0x0400,0x0041,0x0030,e0 ,0x00FF)

	.word	0x41004200
	.word	0x03000400
	.word	0x45004600
	.word	0x07000800

	ChkVld(10,lhv,r12,r13,r14,r11,v10,v9 ,0x0400,0x0110,0x0400,0x0041,0xFFC0,e0 ,0x00FF)

	.word	0x20802180
	.word	0x62806380
	.word	0x24802580
	.word	0x66806780

	ChkVld(11,lhv,r13,r14,r15,r12,v11,v10,0x0400,0x0120,0x0400,0x0040,0x0000,e0 ,0x00FF)

	.word	0x28802980
	.word	0x6A806B80
	.word	0x2C802D80
	.word	0x6E806F80

	ChkVld(12,lhv,r14,r15,r16,r13,v12,v11,0x0400,0x0130,0x0400,0x0040,0x0010,e0 ,0x00FF)

	.word	0x18801980
	.word	0x5A805B80
	.word	0x1C801D80
	.word	0x5E805F80

	ChkVld(13,lhv,r15,r16,r17,r14,v13,v12,0x0400,0x0140,0x0400,0x0040,0xFFF0,e0 ,0x00FF)

	.word	0x38803980
	.word	0x7A807B80
	.word	0x3C803D80
	.word	0x7E800000

	ChkVld(14,lhv,r16,r17,r18,r15,v14,v13,0x0400,0x0150,0x0400,0x0040,0x0030,e0 ,0x00FF)

	.word	0x00800180
	.word	0x42804380
	.word	0x04800580
	.word	0x46804780

	ChkVld(15,lhv,r17,r18,r19,r16,v15,v14,0x0400,0x0160,0x0400,0x0040,0xFFC0,e0 ,0x00FF)

	.word	0x61006200
	.word	0x23002400
	.word	0x65006600
	.word	0x27002800

	ChkVld(16,lhv,r18,r19,r20,r17,v16,v15,0x0400,0x0170,0x0400,0x0041,0x0000,e0 ,0x00FF)

	.word	0x69006A00
	.word	0x2B002C00
	.word	0x6D006E00
	.word	0x2F003000

	ChkVld(17,lhv,r19,r20,r21,r18,v17,v16,0x0400,0x0180,0x0400,0x0041,0x0010,e0 ,0x00FF)

	.word	0x59005A00
	.word	0x1B001C00
	.word	0x5D005E00
	.word	0x1F002000

	ChkVld(18,lhv,r20,r21,r22,r19,v18,v17,0x0400,0x0190,0x0400,0x0041,0xFFF0,e0 ,0x00FF)

	.word	0x79007A00
	.word	0x3B003C00
	.word	0x7D007E00
	.word	0x3F004000

	ChkVld(19,lhv,r21,r22,r23,r20,v19,v18,0x0400,0x01A0,0x0400,0x0041,0x0030,e0 ,0x00FF)

	.word	0x41004200
	.word	0x03000400
	.word	0x45004600
	.word	0x07000800

	ChkVld(20,lhv,r22,r23,r24,r21,v20,v19,0x0400,0x01B0,0x0400,0x0041,0xFFC0,e0 ,0x00FF)

	.word	0x20802180
	.word	0x62806380
	.word	0x24802580
	.word	0x66806780

	ChkVld(21,lhv,r23,r24,r25,r22,v21,v20,0x0400,0x01C0,0x0400,0x0040,0x0000,e0 ,0x00FF)

	.word	0x28802980
	.word	0x6A806B80
	.word	0x2C802D80
	.word	0x6E806F80

	ChkVld(22,lhv,r24,r25,r26,r23,v22,v21,0x0400,0x01D0,0x0400,0x0040,0x0010,e0 ,0x00FF)

	.word	0x18801980
	.word	0x5A805B80
	.word	0x1C801D80
	.word	0x5E805F80

	ChkVld(23,lhv,r25,r26,r27,r24,v23,v22,0x0400,0x01E0,0x0400,0x0040,0xFFF0,e0 ,0x00FF)

	.word	0x38803980
	.word	0x7A807B80
	.word	0x3C803D80
	.word	0x7E800000

	ChkVld(24,lhv,r26,r27,r28,r25,v24,v23,0x0400,0x01F0,0x0400,0x0040,0x0030,e0 ,0x00FF)

	.word	0x00800180
	.word	0x42804380
	.word	0x04800580
	.word	0x46804780

	ChkVld(25,lhv,r27,r28,r29,r26,v25,v24,0x0400,0x0200,0x0400,0x0040,0xFFC0,e0 ,0x00FF)

	.word	0x61006200
	.word	0x23002400
	.word	0x65006600
	.word	0x27002800

	ChkVld(26,lhv,r28,r29,r30,r27,v26,v25,0x0400,0x0210,0x0400,0x0041,0x0000,e0 ,0x00FF)

	.word	0x69006A00
	.word	0x2B002C00
	.word	0x6D006E00
	.word	0x2F003000

	ChkVld(27,lhv,r29,r30,r2 ,r28,v27,v26,0x0400,0x0220,0x0400,0x0041,0x0010,e0 ,0x00FF)

	.word	0x59005A00
	.word	0x1B001C00
	.word	0x5D005E00
	.word	0x1F002000

	ChkVld(28,lhv,r30,r2 ,r3 ,r29,v28,v27,0x0400,0x0230,0x0400,0x0041,0xFFF0,e0 ,0x00FF)

	.word	0x79007A00
	.word	0x3B003C00
	.word	0x7D007E00
	.word	0x3F004000

	ChkVld(29,lhv,r2 ,r3 ,r4 ,r30,v29,v28,0x0400,0x0240,0x0400,0x0041,0x0030,e0 ,0x00FF)

	.word	0x41004200
	.word	0x03000400
	.word	0x45004600
	.word	0x07000800

	ChkVld(30,lhv,r3 ,r4 ,r5 ,r2 ,v30,v29,0x0400,0x0250,0x0400,0x0041,0xFFC0,e0 ,0x00FF)

	.word	0x20802180
	.word	0x62806380
	.word	0x24802580
	.word	0x66806780

	ChkVld(31,lhv,r4 ,r5 ,r6 ,r3 ,v31,v30,0x0400,0x0260,0x0400,0x0040,0x0000,e0 ,0x00FF)

	.word	0x28802980
	.word	0x6A806B80
	.word	0x2C802D80
	.word	0x6E806F80

	ChkVld(32,lhv,r5 ,r6 ,r7 ,r4 ,v0 ,v31,0x0400,0x0270,0x0400,0x0040,0x0010,e0 ,0x00FF)

	.word	0x18801980
	.word	0x5A805B80
	.word	0x1C801D80
	.word	0x5E805F80

	ChkVld(33,lhv,r6 ,r7 ,r8 ,r5 ,v1 ,v0 ,0x0400,0x0280,0x0400,0x0040,0xFFF0,e0 ,0x00FF)

	.word	0x38803980
	.word	0x7A807B80
	.word	0x3C803D80
	.word	0x7E800000

	ChkVld(34,lhv,r7 ,r8 ,r9 ,r6 ,v2 ,v1 ,0x0400,0x0290,0x0400,0x0040,0x0030,e0 ,0x00FF)

	.word	0x00800180
	.word	0x42804380
	.word	0x04800580
	.word	0x46804780

	ChkVld(35,lhv,r8 ,r9 ,r10,r7 ,v3 ,v2 ,0x0400,0x02A0,0x0400,0x0040,0xFFC0,e0 ,0x00FF)

	.word	0x61006200
	.word	0x23002400
	.word	0x65006600
	.word	0x27002800

	ChkVld(36,lhv,r9 ,r10,r11,r8 ,v4 ,v3 ,0x0400,0x02B0,0x0400,0x0041,0x0000,e0 ,0x00FF)

	.word	0x69006A00
	.word	0x2B002C00
	.word	0x6D006E00
	.word	0x2F003000

	ChkVld(37,lhv,r10,r11,r12,r9 ,v5 ,v4 ,0x0400,0x02C0,0x0400,0x0041,0x0010,e0 ,0x00FF)

	.word	0x59005A00
	.word	0x1B001C00
	.word	0x5D005E00
	.word	0x1F002000

	ChkVld(38,lhv,r11,r12,r13,r10,v6 ,v5 ,0x0400,0x02D0,0x0400,0x0041,0xFFF0,e0 ,0x00FF)

	.word	0x79007A00
	.word	0x3B003C00
	.word	0x7D007E00
	.word	0x3F004000

	ChkVld(39,lhv,r12,r13,r14,r11,v7 ,v6 ,0x0400,0x02E0,0x0400,0x0041,0x0030,e0 ,0x00FF)

	.word	0x41004200
	.word	0x03000400
	.word	0x45004600
	.word	0x07000800

	ChkVld(40,lhv,r13,r14,r15,r12,v8 ,v7 ,0x0400,0x02F0,0x0400,0x0041,0xFFC0,e0 ,0x00FF)

	ori	r1, r0, 0xFEED;
Fail:	break;