107163879Schristos/* Tests instructions l.xor, l.xori. 207163879Schristos 3*1424dfb3Schristos Copyright (C) 2017-2020 Free Software Foundation, Inc. 407163879Schristos 507163879Schristos This program is free software; you can redistribute it and/or modify 607163879Schristos it under the terms of the GNU General Public License as published by 707163879Schristos the Free Software Foundation; either version 3 of the License, or 807163879Schristos (at your option) any later version. 907163879Schristos 1007163879Schristos This program is distributed in the hope that it will be useful, 1107163879Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of 1207163879Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1307163879Schristos GNU General Public License for more details. 1407163879Schristos 1507163879Schristos You should have received a copy of the GNU General Public License 1607163879Schristos along with this program. If not, see <http://www.gnu.org/licenses/>. */ 1707163879Schristos 1807163879Schristos# mach: or1k 1907163879Schristos# output: report(0x00000000);\n 2007163879Schristos# output: report(0x00000000);\n 2107163879Schristos# output: report(0x00000000);\n 2207163879Schristos# output: report(0x00000000);\n 2307163879Schristos# output: report(0x00000000);\n 2407163879Schristos# output: report(0x00000000);\n 2507163879Schristos# output: \n 2607163879Schristos# output: report(0xffffffff);\n 2707163879Schristos# output: report(0xffffffff);\n 2807163879Schristos# output: report(0x00000000);\n 2907163879Schristos# output: report(0x00000000);\n 3007163879Schristos# output: report(0x00000000);\n 3107163879Schristos# output: report(0x00000000);\n 3207163879Schristos# output: \n 3307163879Schristos# output: report(0xaaaaaaaa);\n 3407163879Schristos# output: report(0x00000000);\n 3507163879Schristos# output: report(0xaaaaaaaa);\n 3607163879Schristos# output: report(0x00000000);\n 3707163879Schristos# output: report(0x00000000);\n 3807163879Schristos# output: report(0x00000000);\n 3907163879Schristos# output: \n 4007163879Schristos# output: report(0xaaaaaaaa);\n 4107163879Schristos# output: report(0xaaaaaaaa);\n 4207163879Schristos# output: report(0x00000000);\n 4307163879Schristos# output: report(0x00000000);\n 4407163879Schristos# output: report(0x00000000);\n 4507163879Schristos# output: report(0x00000000);\n 4607163879Schristos# output: \n 4707163879Schristos# output: report(0x55555555);\n 4807163879Schristos# output: report(0x00000000);\n 4907163879Schristos# output: report(0x55555555);\n 5007163879Schristos# output: report(0x00000000);\n 5107163879Schristos# output: report(0x00000000);\n 5207163879Schristos# output: report(0x00000000);\n 5307163879Schristos# output: \n 5407163879Schristos# output: report(0x55555555);\n 5507163879Schristos# output: report(0x55555555);\n 5607163879Schristos# output: report(0x00000000);\n 5707163879Schristos# output: report(0x00000000);\n 5807163879Schristos# output: report(0x00000000);\n 5907163879Schristos# output: report(0x00000000);\n 6007163879Schristos# output: \n 6107163879Schristos# output: report(0xaaaaaaaa);\n 6207163879Schristos# output: report(0x55555555);\n 6307163879Schristos# output: report(0xffffffff);\n 6407163879Schristos# output: report(0x00000000);\n 6507163879Schristos# output: report(0x00000000);\n 6607163879Schristos# output: report(0x00000000);\n 6707163879Schristos# output: \n 6807163879Schristos# output: report(0x4c70f07c);\n 6907163879Schristos# output: report(0xb38f0f83);\n 7007163879Schristos# output: report(0xffffffff);\n 7107163879Schristos# output: report(0x00000000);\n 7207163879Schristos# output: report(0x00000000);\n 7307163879Schristos# output: report(0x00000000);\n 7407163879Schristos# output: \n 7507163879Schristos# output: report(0x4c70f07c);\n 7607163879Schristos# output: report(0xc4c70f07);\n 7707163879Schristos# output: report(0x88b7ff7b);\n 7807163879Schristos# output: report(0x00000000);\n 7907163879Schristos# output: report(0x00000000);\n 8007163879Schristos# output: report(0x00000000);\n 8107163879Schristos# output: \n 8207163879Schristos# output: report(0xb38f0f83);\n 8307163879Schristos# output: report(0x38f0f83b);\n 8407163879Schristos# output: report(0x8b7ff7b8);\n 8507163879Schristos# output: report(0x00000000);\n 8607163879Schristos# output: report(0x00000000);\n 8707163879Schristos# output: report(0x00000000);\n 8807163879Schristos# output: \n 8907163879Schristos# output: report(0x00000000);\n 9007163879Schristos# output: report(0x00000000);\n 9107163879Schristos# output: report(0x00000000);\n 9207163879Schristos# output: report(0x00000000);\n 9307163879Schristos# output: report(0x00000000);\n 9407163879Schristos# output: report(0x00000000);\n 9507163879Schristos# output: \n 9607163879Schristos# output: report(0xffffffff);\n 9707163879Schristos# output: report(0x0000ffff);\n 9807163879Schristos# output: report(0x00000000);\n 9907163879Schristos# output: report(0x00000000);\n 10007163879Schristos# output: report(0x00000000);\n 10107163879Schristos# output: report(0x00000000);\n 10207163879Schristos# output: \n 10307163879Schristos# output: report(0xaaaaaaaa);\n 10407163879Schristos# output: report(0x00000000);\n 10507163879Schristos# output: report(0xaaaaaaaa);\n 10607163879Schristos# output: report(0x00000000);\n 10707163879Schristos# output: report(0x00000000);\n 10807163879Schristos# output: report(0x00000000);\n 10907163879Schristos# output: \n 11007163879Schristos# output: report(0xaaaaaaaa);\n 11107163879Schristos# output: report(0x0000aaaa);\n 11207163879Schristos# output: report(0x55550000);\n 11307163879Schristos# output: report(0x00000000);\n 11407163879Schristos# output: report(0x00000000);\n 11507163879Schristos# output: report(0x00000000);\n 11607163879Schristos# output: \n 11707163879Schristos# output: report(0x55555555);\n 11807163879Schristos# output: report(0x00000000);\n 11907163879Schristos# output: report(0x55555555);\n 12007163879Schristos# output: report(0x00000000);\n 12107163879Schristos# output: report(0x00000000);\n 12207163879Schristos# output: report(0x00000000);\n 12307163879Schristos# output: \n 12407163879Schristos# output: report(0x55555555);\n 12507163879Schristos# output: report(0x00005555);\n 12607163879Schristos# output: report(0x55550000);\n 12707163879Schristos# output: report(0x00000000);\n 12807163879Schristos# output: report(0x00000000);\n 12907163879Schristos# output: report(0x00000000);\n 13007163879Schristos# output: \n 13107163879Schristos# output: report(0xaaaaaaaa);\n 13207163879Schristos# output: report(0x00005555);\n 13307163879Schristos# output: report(0xaaaaffff);\n 13407163879Schristos# output: report(0x00000000);\n 13507163879Schristos# output: report(0x00000000);\n 13607163879Schristos# output: report(0x00000000);\n 13707163879Schristos# output: \n 13807163879Schristos# output: report(0x4c70f07c);\n 13907163879Schristos# output: report(0x00000f83);\n 14007163879Schristos# output: report(0x4c70ffff);\n 14107163879Schristos# output: report(0x00000000);\n 14207163879Schristos# output: report(0x00000000);\n 14307163879Schristos# output: report(0x00000000);\n 14407163879Schristos# output: \n 14507163879Schristos# output: report(0x4c70f07c);\n 14607163879Schristos# output: report(0x00000f07);\n 14707163879Schristos# output: report(0x4c70ff7b);\n 14807163879Schristos# output: report(0x00000000);\n 14907163879Schristos# output: report(0x00000000);\n 15007163879Schristos# output: report(0x00000000);\n 15107163879Schristos# output: \n 15207163879Schristos# output: report(0xb38f0f83);\n 15307163879Schristos# output: report(0x0000f83b);\n 15407163879Schristos# output: report(0x4c70f7b8);\n 15507163879Schristos# output: report(0x00000000);\n 15607163879Schristos# output: report(0x00000000);\n 15707163879Schristos# output: report(0x00000000);\n 15807163879Schristos# output: \n 15907163879Schristos# output: exit(0)\n 16007163879Schristos 16107163879Schristos#include "or1k-asm-test-helpers.h" 16207163879Schristos 16307163879Schristos STANDARD_TEST_ENVIRONMENT 16407163879Schristos 16507163879Schristos .section .text 16607163879Schristosstart_tests: 16707163879Schristos PUSH LINK_REGISTER_R9 16807163879Schristos 16907163879Schristos /* Always set OVE. We should never trigger an exception, even if 17007163879Schristos this bit is set. */ 17107163879Schristos SET_SPR_SR_FLAGS SPR_SR_OVE, r2, r3 17207163879Schristos 17307163879Schristos /* Test the l.xor instruction with a range of operands. */ 17407163879Schristos 17507163879Schristos TEST_INST_I32_I32 l.xor, 0x00000000, 0x00000000 17607163879Schristos TEST_INST_I32_I32 l.xor, 0xffffffff, 0xffffffff 17707163879Schristos TEST_INST_I32_I32 l.xor, 0xaaaaaaaa, 0x00000000 17807163879Schristos TEST_INST_I32_I32 l.xor, 0xaaaaaaaa, 0xaaaaaaaa 17907163879Schristos TEST_INST_I32_I32 l.xor, 0x55555555, 0x00000000 18007163879Schristos TEST_INST_I32_I32 l.xor, 0x55555555, 0x55555555 18107163879Schristos TEST_INST_I32_I32 l.xor, 0xaaaaaaaa, 0x55555555 18207163879Schristos TEST_INST_I32_I32 l.xor, 0x4c70f07c, 0xb38f0f83 18307163879Schristos TEST_INST_I32_I32 l.xor, 0x4c70f07c, 0xc4c70f07 18407163879Schristos TEST_INST_I32_I32 l.xor, 0xb38f0f83, 0x38f0f83b 18507163879Schristos 18607163879Schristos /* Test the l.xori instruction with a range of operands. */ 18707163879Schristos 18807163879Schristos TEST_INST_I32_I16 l.xori, 0x00000000, 0x0000 18907163879Schristos TEST_INST_I32_I16 l.xori, 0xffffffff, 0xffff 19007163879Schristos TEST_INST_I32_I16 l.xori, 0xaaaaaaaa, 0x0000 19107163879Schristos TEST_INST_I32_I16 l.xori, 0xaaaaaaaa, 0xaaaa 19207163879Schristos TEST_INST_I32_I16 l.xori, 0x55555555, 0x0000 19307163879Schristos TEST_INST_I32_I16 l.xori, 0x55555555, 0x5555 19407163879Schristos TEST_INST_I32_I16 l.xori, 0xaaaaaaaa, 0x5555 19507163879Schristos TEST_INST_I32_I16 l.xori, 0x4c70f07c, 0x0f83 19607163879Schristos TEST_INST_I32_I16 l.xori, 0x4c70f07c, 0x0f07 19707163879Schristos TEST_INST_I32_I16 l.xori, 0xb38f0f83, 0xf83b 19807163879Schristos 19907163879Schristos POP LINK_REGISTER_R9 20007163879Schristos RETURN_TO_LINK_REGISTER_R9 201