two_byte_opcodes.isa revision 4276
1// Copyright (c) 2007 The Hewlett-Packard Development Company 2// All rights reserved. 3// 4// Redistribution and use of this software in source and binary forms, 5// with or without modification, are permitted provided that the 6// following conditions are met: 7// 8// The software must be used only for Non-Commercial Use which means any 9// use which is NOT directed to receiving any direct monetary 10// compensation for, or commercial advantage from such use. Illustrative 11// examples of non-commercial use are academic research, personal study, 12// teaching, education and corporate research & development. 13// Illustrative examples of commercial use are distributing products for 14// commercial advantage and providing services using the software for 15// commercial advantage. 16// 17// If you wish to use this software or functionality therein that may be 18// covered by patents for commercial use, please contact: 19// Director of Intellectual Property Licensing 20// Office of Strategy and Technology 21// Hewlett-Packard Company 22// 1501 Page Mill Road 23// Palo Alto, California 94304 24// 25// Redistributions of source code must retain the above copyright notice, 26// this list of conditions and the following disclaimer. Redistributions 27// in binary form must reproduce the above copyright notice, this list of 28// conditions and the following disclaimer in the documentation and/or 29// other materials provided with the distribution. Neither the name of 30// the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its 31// contributors may be used to endorse or promote products derived from 32// this software without specific prior written permission. No right of 33// sublicense is granted herewith. Derivatives of the software and 34// output created using the software may be prepared, but only for 35// Non-Commercial Uses. Derivatives of the software may be shared with 36// others provided: (i) the others agree to abide by the list of 37// conditions herein which includes the Non-Commercial Use restrictions; 38// and (ii) such Derivatives of the software include the above copyright 39// notice to acknowledge the contribution from this software where 40// applicable, this list of conditions and the disclaimer below. 41// 42// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 43// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 44// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 45// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 46// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 47// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 48// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 49// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 50// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 51// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 52// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 53// 54// Authors: Gabe Black 55 56//////////////////////////////////////////////////////////////////// 57// 58// Decode the two byte opcodes 59// 600x2: decode OPCODE_PREFIXA { 61 0xF0: decode OPCODE_OP_TOP5 { 62 format WarnUnimpl { 63 0x00: decode OPCODE_OP_BOTTOM3 { 64 0x00: group6(); 65 0x01: group7(); 66 0x02: lar_Gv_Ew(); 67 0x03: lsl_Gv_Ew(); 68 //sandpile.org doesn't seem to know what this is... ? 69 0x04: loadall_or_reset_or_hang(); 70 //sandpile.org says (AMD) after syscall, so I might want to check 71 //if that means amd64 or AMD machines 72 0x05: loadall_or_syscall(); 73 0x06: clts(); 74 //sandpile.org says (AMD) after sysret, so I might want to check 75 //if that means amd64 or AMD machines 76 0x07: loadall_or_sysret(); 77 } 78 0x01: decode OPCODE_OP_BOTTOM3 { 79 0x0: holderholder(); 80 0x1: holder(); 81 0x2: holder(); 82 0x3: holder(); 83 0x4: holder(); 84 0x5: holder(); 85 0x6: holder(); 86 0x7: holder(); 87 } 88 0x02: decode OPCODE_OP_BOTTOM3 { 89 0x0: holder(); 90 0x1: holder(); 91 0x2: holder(); 92 0x3: holder(); 93 0x4: holder(); 94 0x5: holder(); 95 0x6: holder(); 96 0x7: holder(); 97 } 98 0x03: decode OPCODE_OP_BOTTOM3 { 99 0x0: holder(); 100 0x1: holder(); 101 0x2: holder(); 102 0x3: holder(); 103 0x4: holder(); 104 0x5: holder(); 105 0x6: holder(); 106 0x7: holder(); 107 } 108 0x04: decode OPCODE_OP_BOTTOM3 { 109 0x0: holder(); 110 0x1: holder(); 111 0x2: holder(); 112 0x3: holder(); 113 0x4: holder(); 114 0x5: holder(); 115 0x6: holder(); 116 0x7: holder(); 117 } 118 0x05: decode OPCODE_OP_BOTTOM3 { 119 0x0: holder(); 120 0x1: holder(); 121 0x2: holder(); 122 0x3: holder(); 123 0x4: holder(); 124 0x5: holder(); 125 0x6: holder(); 126 0x7: holder(); 127 } 128 0x06: decode OPCODE_OP_BOTTOM3 { 129 0x0: holder(); 130 0x1: holder(); 131 0x2: holder(); 132 0x3: holder(); 133 0x4: holder(); 134 0x5: holder(); 135 0x6: holder(); 136 0x7: holder(); 137 } 138 0x07: decode OPCODE_OP_BOTTOM3 { 139 0x0: holder(); 140 0x1: holder(); 141 0x2: holder(); 142 0x3: holder(); 143 0x4: holder(); 144 0x5: holder(); 145 0x6: holder(); 146 0x7: holder(); 147 } 148 0x08: decode OPCODE_OP_BOTTOM3 { 149 0x0: holder(); 150 0x1: holder(); 151 0x2: holder(); 152 0x3: holder(); 153 0x4: holder(); 154 0x5: holder(); 155 0x6: holder(); 156 0x7: holder(); 157 } 158 0x09: decode OPCODE_OP_BOTTOM3 { 159 0x0: holder(); 160 0x1: holder(); 161 0x2: holder(); 162 0x3: holder(); 163 0x4: holder(); 164 0x5: holder(); 165 0x6: holder(); 166 0x7: holder(); 167 } 168 0x0A: decode OPCODE_OP_BOTTOM3 { 169 0x0: holder(); 170 0x1: holder(); 171 0x2: holder(); 172 0x3: holder(); 173 0x4: holder(); 174 0x5: holder(); 175 0x6: holder(); 176 0x7: holder(); 177 } 178 0x0B: decode OPCODE_OP_BOTTOM3 { 179 0x0: holder(); 180 0x1: holder(); 181 0x2: holder(); 182 0x3: holder(); 183 0x4: holder(); 184 0x5: holder(); 185 0x6: holder(); 186 0x7: holder(); 187 } 188 0x0C: decode OPCODE_OP_BOTTOM3 { 189 0x0: holder(); 190 0x1: holder(); 191 0x2: holder(); 192 0x3: holder(); 193 0x4: holder(); 194 0x5: holder(); 195 0x6: holder(); 196 0x7: holder(); 197 } 198 0x0D: decode OPCODE_OP_BOTTOM3 { 199 0x0: holder(); 200 0x1: holder(); 201 0x2: holder(); 202 0x3: holder(); 203 0x4: holder(); 204 0x5: holder(); 205 0x6: holder(); 206 0x7: holder(); 207 } 208 0x0E: decode OPCODE_OP_BOTTOM3 { 209 0x0: holder(); 210 0x1: holder(); 211 0x2: holder(); 212 0x3: holder(); 213 0x4: holder(); 214 0x5: holder(); 215 0x6: holder(); 216 0x7: holder(); 217 } 218 0x0F: decode OPCODE_OP_BOTTOM3 { 219 0x0: holder(); 220 0x1: holder(); 221 0x2: holder(); 222 0x3: holder(); 223 0x4: holder(); 224 0x5: holder(); 225 0x6: holder(); 226 0x7: holder(); 227 } 228 0x10: decode OPCODE_OP_BOTTOM3 { 229 0x0: holder(); 230 0x1: holder(); 231 0x2: holder(); 232 0x3: holder(); 233 0x4: holder(); 234 0x5: holder(); 235 0x6: holder(); 236 0x7: holder(); 237 } 238 0x11: decode OPCODE_OP_BOTTOM3 { 239 0x0: holder(); 240 0x1: holder(); 241 0x2: holder(); 242 0x3: holder(); 243 0x4: holder(); 244 0x5: holder(); 245 0x6: holder(); 246 0x7: holder(); 247 } 248 0x12: decode OPCODE_OP_BOTTOM3 { 249 0x0: holder(); 250 0x1: holder(); 251 0x2: holder(); 252 0x3: holder(); 253 0x4: holder(); 254 0x5: holder(); 255 0x6: holder(); 256 0x7: holder(); 257 } 258 0x13: decode OPCODE_OP_BOTTOM3 { 259 0x0: holder(); 260 0x1: holder(); 261 0x2: holder(); 262 0x3: holder(); 263 0x4: holder(); 264 0x5: holder(); 265 0x6: holder(); 266 0x7: holder(); 267 } 268 0x14: decode OPCODE_OP_BOTTOM3 { 269 0x0: holder(); 270 0x1: holder(); 271 0x2: holder(); 272 0x3: holder(); 273 0x4: holder(); 274 0x5: holder(); 275 0x6: holder(); 276 0x7: holder(); 277 } 278 0x15: decode OPCODE_OP_BOTTOM3 { 279 0x0: holder(); 280 0x1: holder(); 281 0x2: holder(); 282 0x3: holder(); 283 0x4: holder(); 284 0x5: holder(); 285 0x6: holder(); 286 0x7: holder(); 287 } 288 0x16: decode OPCODE_OP_BOTTOM3 { 289 0x0: holder(); 290 0x1: holder(); 291 0x2: holder(); 292 0x3: holder(); 293 0x4: holder(); 294 0x5: holder(); 295 0x6: holder(); 296 0x7: holder(); 297 } 298 0x17: decode OPCODE_OP_BOTTOM3 { 299 0x0: holder(); 300 0x1: holder(); 301 0x2: holder(); 302 0x3: holder(); 303 0x4: holder(); 304 0x5: holder(); 305 0x6: holder(); 306 0x7: holder(); 307 } 308 0x18: decode OPCODE_OP_BOTTOM3 { 309 0x0: holder(); 310 0x1: holder(); 311 0x2: holder(); 312 0x3: holder(); 313 0x4: holder(); 314 0x5: holder(); 315 0x6: holder(); 316 0x7: holder(); 317 } 318 0x19: decode OPCODE_OP_BOTTOM3 { 319 0x0: holder(); 320 0x1: holder(); 321 0x2: holder(); 322 0x3: holder(); 323 0x4: holder(); 324 0x5: holder(); 325 0x6: holder(); 326 0x7: holder(); 327 } 328 0x1A: decode OPCODE_OP_BOTTOM3 { 329 0x0: holder(); 330 0x1: holder(); 331 0x2: holder(); 332 0x3: holder(); 333 0x4: holder(); 334 0x5: holder(); 335 0x6: holder(); 336 0x7: holder(); 337 } 338 0x1B: decode OPCODE_OP_BOTTOM3 { 339 0x0: holder(); 340 0x1: holder(); 341 0x2: holder(); 342 0x3: holder(); 343 0x4: holder(); 344 0x5: holder(); 345 0x6: holder(); 346 0x7: holder(); 347 } 348 0x1C: decode OPCODE_OP_BOTTOM3 { 349 0x0: holder(); 350 0x1: holder(); 351 0x2: holder(); 352 0x3: holder(); 353 0x4: holder(); 354 0x5: holder(); 355 0x6: holder(); 356 0x7: holder(); 357 } 358 0x1D: decode OPCODE_OP_BOTTOM3 { 359 0x0: holder(); 360 0x1: holder(); 361 0x2: holder(); 362 0x3: holder(); 363 0x4: holder(); 364 0x5: holder(); 365 0x6: holder(); 366 0x7: holder(); 367 } 368 0x1E: decode OPCODE_OP_BOTTOM3 { 369 0x0: holder(); 370 0x1: holder(); 371 0x2: holder(); 372 0x3: holder(); 373 0x4: holder(); 374 0x5: holder(); 375 0x6: holder(); 376 0x7: holder(); 377 } 378 0x1F: decode OPCODE_OP_BOTTOM3 { 379 0x0: holder(); 380 0x1: holder(); 381 0x2: holder(); 382 0x3: holder(); 383 0x4: holder(); 384 0x5: holder(); 385 0x6: holder(); 386 0x7: holder(); 387 } 388 default: FailUnimpl::twoByteOps(); 389 } 390 } 391 default: M5InternalError::error( 392 {{"Unexpected first opcode byte in two byte opcode!"}}); 393} 394