Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
00001 /* 00002 00003 Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. 00004 00005 This program is free software; you can redistribute it and/or modify it 00006 under the terms of version 2 of the GNU General Public License as 00007 published by the Free Software Foundation. 00008 00009 This program is distributed in the hope that it would be useful, but 00010 WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 00013 Further, this software is distributed without any warranty that it is 00014 free of the rightful claim of any third person regarding infringement 00015 or the like. Any license provided herein, whether implied or 00016 otherwise, applies only to this software file. Patent licenses, if 00017 any, provided herein do not apply to combinations of this program with 00018 other software, or any other product whatsoever. 00019 00020 You should have received a copy of the GNU General Public License along 00021 with this program; if not, write the Free Software Foundation, Inc., 59 00022 Temple Place - Suite 330, Boston MA 02111-1307, USA. 00023 00024 Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, 00025 Mountain View, CA 94043, or: 00026 00027 http://www.sgi.com 00028 00029 For further information regarding this notice, see: 00030 00031 http://oss.sgi.com/projects/GenInfo/NoticeExplan 00032 00033 */ 00034 00035 00036 // 00037 // Generate a list of literal classes and values for the ISA. 00039 00040 #include <stddef.h> 00041 #include "isa_lits_gen.h" 00042 00043 main () 00044 { 00045 LIT_RANGE r_1, r_4, r_8, r_16; 00046 LIT_RANGE r0, r1, r4, r7, r8, r15, r16; 00047 LIT_RANGE r_127to128, r_128ULLto_1ULL, r_127ULLto_1ULL, r_128Uto_1U, 00048 r_127Uto_1U; 00049 LIT_RANGE r1to4, r1to3, r1to16, r1to64, r0to127, r1to128; 00050 00051 ISA_Lits_Begin(); 00052 00053 #define TWO32 (1ULL<<32) 00054 #define TWO64 (0) 00055 00056 r_1 = ISA_Create_Lit_Range("-1", -1, -1); 00057 r_4 = ISA_Create_Lit_Range("-4", -4, -4); 00058 r_8 = ISA_Create_Lit_Range("-8", -8, -8); 00059 r_16 = ISA_Create_Lit_Range("-16", -16, -16); 00060 r0 = ISA_Create_Lit_Range("0", 0, 0); 00061 r1 = ISA_Create_Lit_Range("1", 1, 1); 00062 r4 = ISA_Create_Lit_Range("4", 4, 4); 00063 r7 = ISA_Create_Lit_Range("7", 7, 7); 00064 r8 = ISA_Create_Lit_Range("8", 8, 8); 00065 r15 = ISA_Create_Lit_Range("15", 15, 15); 00066 r16 = ISA_Create_Lit_Range("16", 16, 16); 00067 r1to4 = ISA_Create_Lit_Range("1..4", 1, 4); 00068 r1to3 = ISA_Create_Lit_Range("1..3", 1, 3); 00069 r1to16 = ISA_Create_Lit_Range("1..16", 1, 16); 00070 r1to64 = ISA_Create_Lit_Range("1..64", 1, 64); 00071 r0to127 = ISA_Create_Lit_Range("0..127", 0, 127); 00072 r1to128 = ISA_Create_Lit_Range("1..128", 1, 128); 00073 r_127to128 = ISA_Create_Lit_Range("-127..128", -127, 128); 00074 r_128ULLto_1ULL = ISA_Create_Lit_Range("2^64-128..2^64-1", TWO64-128, TWO64-1); 00075 r_127ULLto_1ULL = ISA_Create_Lit_Range("2^64-127..2^64", TWO64-127, TWO64-1); 00076 r_128Uto_1U = ISA_Create_Lit_Range("2^32-128..2^32-1", TWO32-128, TWO32-1); 00077 r_127Uto_1U = ISA_Create_Lit_Range("2^32-127..2^32", TWO32-127, TWO32); 00078 00079 // ISA_Create_Lit_Class(name, type, [range,...] LIT_RANGE_END) 00080 ISA_Create_Lit_Class("i1", SIGNED, SignedBitRange(1), LIT_RANGE_END); 00081 ISA_Create_Lit_Class("i8", SIGNED, SignedBitRange(8), LIT_RANGE_END); 00082 ISA_Create_Lit_Class("i9", SIGNED, SignedBitRange(9), LIT_RANGE_END); 00083 ISA_Create_Lit_Class("i13", SIGNED, SignedBitRange(13), LIT_RANGE_END); 00084 ISA_Create_Lit_Class("i14", SIGNED, SignedBitRange(14), LIT_RANGE_END); 00085 ISA_Create_Lit_Class("i16", SIGNED, SignedBitRange(16), LIT_RANGE_END); 00086 ISA_Create_Lit_Class("i17", SIGNED, SignedBitRange(17), LIT_RANGE_END); 00087 ISA_Create_Lit_Class("i22", SIGNED, SignedBitRange(22), LIT_RANGE_END); 00088 ISA_Create_Lit_Class("i25", SIGNED, SignedBitRange(25), LIT_RANGE_END); 00089 ISA_Create_Lit_Class("i44", SIGNED, SignedBitRange(44), LIT_RANGE_END); 00090 ISA_Create_Lit_Class("i64", SIGNED, SignedBitRange(64), LIT_RANGE_END); 00091 00092 ISA_Create_Lit_Class("k2", UNSIGNED, UnsignedBitRange(2), LIT_RANGE_END); 00093 ISA_Create_Lit_Class("k4", UNSIGNED, UnsignedBitRange(4), LIT_RANGE_END); 00094 ISA_Create_Lit_Class("k5", UNSIGNED, UnsignedBitRange(5), LIT_RANGE_END); 00095 ISA_Create_Lit_Class("k6", UNSIGNED, UnsignedBitRange(6), LIT_RANGE_END); 00096 ISA_Create_Lit_Class("k7", UNSIGNED, UnsignedBitRange(7), LIT_RANGE_END); 00097 ISA_Create_Lit_Class("k8", UNSIGNED, UnsignedBitRange(8), LIT_RANGE_END); 00098 ISA_Create_Lit_Class("k9", UNSIGNED, UnsignedBitRange(9), LIT_RANGE_END); 00099 ISA_Create_Lit_Class("k21", UNSIGNED, UnsignedBitRange(21), LIT_RANGE_END); 00100 ISA_Create_Lit_Class("k24", UNSIGNED, UnsignedBitRange(24), LIT_RANGE_END); 00101 ISA_Create_Lit_Class("k62", UNSIGNED, UnsignedBitRange(62), LIT_RANGE_END); 00102 00103 ISA_Create_Lit_Class("pmpyshr2", UNSIGNED, r0, r7, r15, r16, LIT_RANGE_END); 00104 ISA_Create_Lit_Class("fetchadd", SIGNED, r_16, r_8, r_4, r_1, r1, r4, r8, r16, 00105 LIT_RANGE_END); 00106 ISA_Create_Lit_Class("shfadd", UNSIGNED, r1to4, LIT_RANGE_END); 00107 ISA_Create_Lit_Class("pshfadd", UNSIGNED, r1to3, LIT_RANGE_END); 00108 ISA_Create_Lit_Class("len4", UNSIGNED, r1to16, LIT_RANGE_END); 00109 ISA_Create_Lit_Class("len6", UNSIGNED, r1to64, LIT_RANGE_END); 00110 ISA_Create_Lit_Class("scmp", SIGNED, r_127to128, LIT_RANGE_END); 00111 ISA_Create_Lit_Class("ucmp1", UNSIGNED, r0to127, r_128ULLto_1ULL, LIT_RANGE_END); 00112 ISA_Create_Lit_Class("ucmp2", UNSIGNED, r1to128, r_127ULLto_1ULL, LIT_RANGE_END); 00113 ISA_Create_Lit_Class("ucmp3", UNSIGNED, r0to127, r_128Uto_1U, LIT_RANGE_END); 00114 ISA_Create_Lit_Class("ucmp4", UNSIGNED, r1to128, r_127Uto_1U, LIT_RANGE_END); 00115 00116 ISA_Lits_End(); 00117 }