1 1.1 christos ; Fujitsu FRV opcode support, for GNU Binutils. -*- Scheme -*- 2 1.1 christos ; 3 1.1 christos ; Copyright 2000, 2001, 2003, 2004, 2007, 2009 Free Software Foundation, Inc. 4 1.1 christos ; 5 1.1 christos ; Contributed by Red Hat Inc; developed under contract from Fujitsu. 6 1.1 christos ; 7 1.1 christos ; This file is part of the GNU Binutils. 8 1.1 christos ; 9 1.1 christos ; This program is free software; you can redistribute it and/or modify 10 1.1 christos ; it under the terms of the GNU General Public License as published by 11 1.1 christos ; the Free Software Foundation; either version 3 of the License, or 12 1.1 christos ; (at your option) any later version. 13 1.1 christos ; 14 1.1 christos ; This program is distributed in the hope that it will be useful, 15 1.1 christos ; but WITHOUT ANY WARRANTY; without even the implied warranty of 16 1.1 christos ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 1.1 christos ; GNU General Public License for more details. 18 1.1 christos ; 19 1.1 christos ; You should have received a copy of the GNU General Public License 20 1.1 christos ; along with this program; if not, write to the Free Software 21 1.1 christos ; Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, 22 1.1 christos ; MA 02110-1301, USA. 23 1.1 christos 24 1.1 christos (include "simplify.inc") 25 1.1 christos 26 1.1 christos ; define-arch must appear first 27 1.1 christos 28 1.1 christos (define-arch 29 1.1 christos (name frv) ; name of cpu architecture 30 1.1 christos (comment "Fujitsu FRV") 31 1.1 christos (insn-lsb0? #t) 32 1.1 christos (machs frv fr550 fr500 fr450 fr400 tomcat simple) 33 1.1 christos (isas frv) 34 1.1 christos ) 35 1.1 christos 36 1.1 christos (define-isa 37 1.1 christos (name frv) 38 1.1 christos (base-insn-bitsize 32) 39 1.1 christos ; Initial bitnumbers to decode insns by. 40 1.1 christos (decode-assist (24 23 22 21 20 19 18)) 41 1.1 christos (liw-insns 1) ; The frv fetches up to 1 insns at a time. 42 1.1 christos (parallel-insns 8) ; The frv executes up to 8 insns at a time. 43 1.1 christos ) 44 1.1 christos 45 1.1 christos ; Cpu family definitions. 46 1.1 christos ; 47 1.1 christos (define-cpu 48 1.1 christos ; cpu names must be distinct from the architecture name and machine names. 49 1.1 christos ; The "b" suffix stands for "base" and is the convention. 50 1.1 christos ; The "f" suffix stands for "family" and is the convention. 51 1.1 christos (name frvbf) 52 1.1 christos (comment "Fujitsu FRV base family") 53 1.1 christos (endian big) 54 1.1 christos (word-bitsize 32) 55 1.1 christos ) 56 1.1 christos 58 1.1 christos ; Generic FR-V machine. Supports the entire architecture 59 1.1 christos (define-mach 60 1.1 christos (name frv) 61 1.1 christos (comment "Generic FRV cpu") 62 1.1 christos (cpu frvbf) 63 1.1 christos ) 64 1.1 christos (define-model 65 1.1 christos (name frv) (comment "Generic FRV model") (attrs) 66 1.1 christos (mach frv) 67 1.1 christos 68 1.1 christos (pipeline all "" () ((fetch) (decode) (execute) (writeback))) 69 1.1 christos 70 1.1 christos ; `state' is a list of variables for recording model state 71 1.1 christos ; (state) 72 1.1 christos 73 1.1 christos (unit u-exec "Execution Unit" () 74 1.1 christos 1 1 ; issue done 75 1.1 christos () ; state 76 1.1 christos () ; inputs 77 1.1 christos () ; outputs 78 1.1 christos () ; profile action (default) 79 1.1 christos ) 80 1.1 christos ) 81 1.1 christos 83 1.1 christos ; FR550 machine 84 1.1 christos (define-mach 85 1.1 christos (name fr550) 86 1.1 christos (comment "FR550 cpu") 87 1.1 christos (cpu frvbf) 88 1.1 christos ) 89 1.1 christos (define-model 90 1.1 christos (name fr550) (comment "FR550 model") (attrs) 91 1.1 christos (mach fr550) 92 1.1 christos 93 1.1 christos (pipeline all "" () ((fetch) (decode) (execute) (writeback))) 94 1.1 christos 95 1.1 christos ; `state' is a list of variables for recording model state 96 1.1 christos (state 97 1.1 christos ; State items 98 1.1 christos ; These are all masks with each bit representing one register. 99 1.1 christos (prev-fr-load DI) ; Previous use of FR register was target of a load 100 1.1 christos (prev-fr-complex-1 DI) ; Previous use of FR register has variable latency 101 1.1 christos (prev-fr-complex-2 DI) ; Previous use of FR register has variable latency 102 1.1 christos (prev-ccr-complex DI) ; Previous use of CCR register has variable latency 103 1.1 christos (prev-acc-mmac DI) ; Previous use of ACC register was a MMAC category 104 1.1 christos (cur-fr-load DI) ; Current use of FR register was target of a load 105 1.1 christos (cur-fr-complex-1 DI) ; Current use of FR register has variable latency 106 1.1 christos (cur-fr-complex-2 DI) ; Current use of FR register has variable latency 107 1.1 christos (cur-ccr-complex SI) ; Current use of CCR register has variable latency 108 1.1 christos (cur-acc-mmac DI) ; Current use of ACC register was a MMAC category 109 1.1 christos ) 110 1.1 christos ; Basic unit for instructions with no latency penalties 111 1.1 christos (unit u-exec "Execution Unit" () 112 1.1 christos 1 1 ; issue done 113 1.1 christos () ; state 114 1.1 christos () ; inputs 115 1.1 christos () ; outputs 116 1.1 christos () ; profile action (default) 117 1.1 christos ) 118 1.1 christos ; Basic integer insn unit 119 1.1 christos (unit u-integer "Integer Unit" () 120 1.1 christos 1 1 ; issue done 121 1.1 christos () ; state 122 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 123 1.1 christos ((GRk INT -1) (ICCi_1 INT -1)) ; outputs 124 1.1 christos () ; profile action (default) 125 1.1 christos ) 126 1.1 christos ; Integer multiplication unit 127 1.1 christos (unit u-imul "Integer Multiplication Unit" () 128 1.1 christos 1 1 ; issue done 129 1.1 christos () ; state 130 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 131 1.1 christos ((GRdoublek INT -1) (ICCi_1 INT -1)) ; outputs 132 1.1 christos () ; profile action (default) 133 1.1 christos ) 134 1.1 christos ; Integer division unit 135 1.1 christos (unit u-idiv "Integer Division Unit" () 136 1.1 christos 1 1 ; issue done 137 1.1 christos () ; state 138 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 139 1.1 christos ((GRk INT -1) (ICCi_1 INT -1)) ; outputs 140 1.1 christos () ; profile action (default) 141 1.1 christos ) 142 1.1 christos ; Branch unit 143 1.1 christos (unit u-branch "Branch Unit" () 144 1.1 christos 1 1 ; issue done 145 1.1 christos () ; state 146 1.1 christos ((GRi INT -1) (GRj INT -1) 147 1.1 christos (ICCi_2 INT -1) (FCCi_2 INT -1)) ; inputs 148 1.1 christos ((pc)) ; outputs 149 1.1 christos () ; profile action (default) 150 1.1 christos ) 151 1.1 christos ; Trap unit 152 1.1 christos (unit u-trap "Trap Unit" () 153 1.1 christos 1 1 ; issue done 154 1.1 christos () ; state 155 1.1 christos ((GRi INT -1) (GRj INT -1) 156 1.1 christos (ICCi_2 INT -1) (FCCi_2 INT -1)) ; inputs 157 1.1 christos () ; outputs 158 1.1 christos () ; profile action (default) 159 1.1 christos ) 160 1.1 christos ; Condition code check unit 161 1.1 christos (unit u-check "Check Unit" () 162 1.1 christos 1 1 ; issue done 163 1.1 christos () ; state 164 1.1 christos ((ICCi_3 INT -1) (FCCi_3 INT -1)) ; inputs 165 1.1 christos () ; outputs 166 1.1 christos () ; profile action (default) 167 1.1 christos ) 168 1.1 christos ; Float Arithmetic unit 169 1.1 christos (unit u-float-arith "Float Arithmetic unit" () 170 1.1 christos 1 1 ; issue done 171 1.1 christos () ; state 172 1.1 christos ((FRi INT -1) (FRj INT -1) ; inputs 173 1.1 christos (FRdoublei INT -1) (FRdoublej INT -1)) ; inputs 174 1.1 christos ((FRk INT -1) (FRdoublek INT -1)) ; outputs 175 1.1 christos () ; profile action (default) 176 1.1 christos ) 177 1.1 christos ; Float Dual Arithmetic unit 178 1.1 christos (unit u-float-dual-arith "Float Arithmetic unit" () 179 1.1 christos ; This unit has a 2 cycle penalty -- see table 14-14 in the fr550 LSI 180 1.1 christos 1 3 ; issue done 181 1.1 christos () ; state 182 1.1 christos ((FRi INT -1) (FRj INT -1) ; inputs 183 1.1 christos (FRdoublei INT -1) (FRdoublej INT -1)) ; inputs 184 1.1 christos ((FRk INT -1) (FRdoublek INT -1)) ; outputs 185 1.1 christos () ; profile action (default) 186 1.1 christos ) 187 1.1 christos ; Float Div unit 188 1.1 christos (unit u-float-div "Float Div unit" () 189 1.1 christos 1 1 ; issue done 190 1.1 christos () ; state 191 1.1 christos ((FRi INT -1) (FRj INT -1)) ; inputs 192 1.1 christos ((FRk INT -1)) ; outputs 193 1.1 christos () ; profile action (default) 194 1.1 christos ) 195 1.1 christos ; Float Square Root unit 196 1.1 christos (unit u-float-sqrt "Float Square Root unit" () 197 1.1 christos 1 1 ; issue done 198 1.1 christos () ; state 199 1.1 christos ((FRj INT -1) (FRdoublej INT -1)) ; inputs 200 1.1 christos ((FRk INT -1) (FRdoublek INT -1)) ; outputs 201 1.1 christos () ; profile action (default) 202 1.1 christos ) 203 1.1 christos ; Float Compare unit 204 1.1 christos (unit u-float-compare "Float Compare unit" () 205 1.1 christos 1 1 ; issue done 206 1.1 christos () ; state 207 1.1 christos ((FRi INT -1) (FRj INT -1) 208 1.1 christos (FRdoublei INT -1) (FRdoublej INT -1)) ; inputs 209 1.1 christos ((FCCi_2 INT -1)) ; outputs 210 1.1 christos () ; profile action (default) 211 1.1 christos ) 212 1.1 christos ; Dual Float Compare unit 213 1.1 christos (unit u-float-dual-compare "Float Dual Compare unit" () 214 1.1 christos ; This unit has a 2 cycle penalty -- see table 14-14 in the fr550 LSI 215 1.1 christos 1 3 ; issue done 216 1.1 christos () ; state 217 1.1 christos ((FRi INT -1) (FRj INT -1)) ; inputs 218 1.1 christos ((FCCi_2 INT -1)) ; outputs 219 1.1 christos () ; profile action (default) 220 1.1 christos ) 221 1.1 christos ; FR Move to GR unit 222 1.1 christos (unit u-fr2gr "FR Move to GR Unit" () 223 1.1 christos 1 1 ; issue done 224 1.1 christos () ; state 225 1.1 christos ((FRintk INT -1)) ; inputs 226 1.1 christos ((GRj INT -1)) ; outputs 227 1.1 christos () ; profile action (default) 228 1.1 christos ) 229 1.1 christos ; GR Move to FR unit 230 1.1 christos (unit u-gr2fr "GR Move to FR Unit" () 231 1.1 christos 1 1 ; issue done 232 1.1 christos () ; state 233 1.1 christos ((GRj INT -1)) ; inputs 234 1.1 christos ((FRintk INT -1)) ; outputs 235 1.1 christos () ; profile action (default) 236 1.1 christos ) 237 1.1 christos ; SPR Move to GR unit 238 1.1 christos (unit u-spr2gr "SPR Move to GR Unit" () 239 1.1 christos 1 1 ; issue done 240 1.1 christos () ; state 241 1.1 christos ((spr INT -1)) ; inputs 242 1.1 christos ((GRj INT -1)) ; outputs 243 1.1 christos () ; profile action (default) 244 1.1 christos ) 245 1.1 christos ; GR Move to SPR unit 246 1.1 christos (unit u-gr2spr "GR Move to SPR Unit" () 247 1.1 christos 1 1 ; issue done 248 1.1 christos () ; state 249 1.1 christos ((GRj INT -1)) ; inputs 250 1.1 christos ((spr INT -1)) ; outputs 251 1.1 christos () ; profile action (default) 252 1.1 christos ) 253 1.1 christos ; GR set half unit 254 1.1 christos (unit u-set-hilo "GR Set Half" () 255 1.1 christos 1 1 ; issue done 256 1.1 christos () ; state 257 1.1 christos () ; inputs 258 1.1 christos ((GRkhi INT -1) (GRklo INT -1)) ; outputs 259 1.1 christos () ; profile action (default) 260 1.1 christos ) 261 1.1 christos ; GR load unit 262 1.1 christos (unit u-gr-load "GR Load Unit" () 263 1.1 christos 1 1 ; issue done 264 1.1 christos () ; state 265 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 266 1.1 christos ((GRk INT -1) (GRdoublek INT -1)) ; outputs 267 1.1 christos () ; profile action (default) 268 1.1 christos ) 269 1.1 christos ; GR store unit 270 1.1 christos (unit u-gr-store "GR Store Unit" () 271 1.1 christos 1 1 ; issue done 272 1.1 christos () ; state 273 1.1 christos ((GRi INT -1) (GRj INT -1) (GRk INT -1) (GRdoublek INT -1)) ; inputs 274 1.1 christos () ; outputs 275 1.1 christos () ; profile action (default) 276 1.1 christos ) 277 1.1 christos ; FR load unit 278 1.1 christos (unit u-fr-load "FR Load Unit" () 279 1.1 christos 1 1 ; issue done 280 1.1 christos () ; state 281 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 282 1.1 christos ((FRintk INT -1) (FRdoublek INT -1)) ; outputs 283 1.1 christos () ; profile action (default) 284 1.1 christos ) 285 1.1 christos ; FR store unit 286 1.1 christos (unit u-fr-store "FR Store Unit" () 287 1.1 christos 1 1 ; issue done 288 1.1 christos () ; state 289 1.1 christos ((GRi INT -1) (GRj INT -1) (FRintk INT -1) (FRdoublek INT -1)) ; inputs 290 1.1 christos () ; outputs 291 1.1 christos () ; profile action (default) 292 1.1 christos ) 293 1.1 christos ; Swap unit 294 1.1 christos (unit u-swap "Swap Unit" () 295 1.1 christos 1 1 ; issue done 296 1.1 christos () ; state 297 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 298 1.1 christos ((GRk INT -1)) ; outputs 299 1.1 christos () ; profile action (default) 300 1.1 christos ) 301 1.1 christos ; FR Move to FR unit 302 1.1 christos (unit u-fr2fr "FR Move to FR Unit" () 303 1.1 christos 1 1 ; issue done 304 1.1 christos () ; state 305 1.1 christos ((FRi INT -1)) ; inputs 306 1.1 christos ((FRk INT -1)) ; outputs 307 1.1 christos () ; profile action (default) 308 1.1 christos ) 309 1.1 christos ; Clrgr unit 310 1.1 christos (unit u-clrgr "Clrgr Unit" () 311 1.1 christos 1 1 ; issue done 312 1.1 christos () ; state 313 1.1 christos ((GRk INT -1)) ; inputs 314 1.1 christos () ; outputs 315 1.1 christos () ; profile action (default) 316 1.1 christos ) 317 1.1 christos ; Clrfr unit 318 1.1 christos (unit u-clrfr "Clrfr Unit" () 319 1.1 christos 1 1 ; issue done 320 1.1 christos () ; state 321 1.1 christos ((FRk INT -1)) ; inputs 322 1.1 christos () ; outputs 323 1.1 christos () ; profile action (default) 324 1.1 christos ) 325 1.1 christos ; Insn cache invalidate unit 326 1.1 christos (unit u-ici "Insn cache invalidate unit" () 327 1.1 christos 1 1 ; issue done 328 1.1 christos () ; state 329 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 330 1.1 christos () ; outputs 331 1.1 christos () ; profile action (default) 332 1.1 christos ) 333 1.1 christos ; Data cache invalidate unit 334 1.1 christos (unit u-dci "Data cache invalidate unit" () 335 1.1 christos 1 1 ; issue done 336 1.1 christos () ; state 337 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 338 1.1 christos () ; outputs 339 1.1 christos () ; profile action (default) 340 1.1 christos ) 341 1.1 christos ; Data cache flush unit 342 1.1 christos (unit u-dcf "Data cache flush unit" () 343 1.1 christos 1 1 ; issue done 344 1.1 christos () ; state 345 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 346 1.1 christos () ; outputs 347 1.1 christos () ; profile action (default) 348 1.1 christos ) 349 1.1 christos ; Insn cache preload unit 350 1.1 christos (unit u-icpl "Insn cache preload unit" () 351 1.1 christos 1 1 ; issue done 352 1.1 christos () ; state 353 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 354 1.1 christos () ; outputs 355 1.1 christos () ; profile action (default) 356 1.1 christos ) 357 1.1 christos ; Data cache preload unit 358 1.1 christos (unit u-dcpl "Data cache preload unit" () 359 1.1 christos 1 1 ; issue done 360 1.1 christos () ; state 361 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 362 1.1 christos () ; outputs 363 1.1 christos () ; profile action (default) 364 1.1 christos ) 365 1.1 christos ; Insn cache unlock unit 366 1.1 christos (unit u-icul "Insn cache unlock unit" () 367 1.1 christos 1 1 ; issue done 368 1.1 christos () ; state 369 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 370 1.1 christos () ; outputs 371 1.1 christos () ; profile action (default) 372 1.1 christos ) 373 1.1 christos ; Data cache unlock unit 374 1.1 christos (unit u-dcul "Data cache unlock unit" () 375 1.1 christos 1 1 ; issue done 376 1.1 christos () ; state 377 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 378 1.1 christos () ; outputs 379 1.1 christos () ; profile action (default) 380 1.1 christos ) 381 1.1 christos ; commit unit 382 1.1 christos (unit u-commit "Commit Unit" () 383 1.1 christos 1 1 ; issue done 384 1.1 christos () ; state 385 1.1 christos ((GRk INT -1) (FRk INT -1)) ; inputs 386 1.1 christos () ; outputs 387 1.1 christos () ; profile action (default) 388 1.1 christos ) 389 1.1 christos ; Float Conversion unit 390 1.1 christos (unit u-float-convert "Float Conversion unit" () 391 1.1 christos 1 1 ; issue done 392 1.1 christos () ; state 393 1.1 christos ((FRj INT -1) (FRintj INT -1) (FRdoublej INT -1)) ; inputs 394 1.1 christos ((FRk INT -1) (FRintk INT -1) (FRdoublek INT -1)) ; outputs 395 1.1 christos () ; profile action (default) 396 1.1 christos ) 397 1.1 christos ; Media units 398 1.1 christos (unit u-media "Media unit" () 399 1.1 christos 1 1 ; issue done 400 1.1 christos () ; state 401 1.1 christos ((FRinti INT -1) (FRintj INT -1)) ; inputs 402 1.1 christos ((FRintk INT -1)) ; outputs 403 1.1 christos () ; profile action (default) 404 1.1 christos ) 405 1.1 christos (unit u-media-quad "Media-quad unit" () 406 1.1 christos 1 1 ; issue done 407 1.1 christos () ; state 408 1.1 christos ((FRintieven INT -1) (FRintjeven INT -1)) ; inputs 409 1.1 christos ((FRintkeven INT -1)) ; outputs 410 1.1 christos () ; profile action (default) 411 1.1 christos ) 412 1.1 christos (unit u-media-dual-expand "Media Dual Expand unit" () 413 1.1 christos 1 1 ; issue done 414 1.1 christos () ; state 415 1.1 christos ((FRinti INT -1)) ; inputs 416 1.1 christos ((FRintkeven INT -1)) ; outputs 417 1.1 christos () ; profile action (default) 418 1.1 christos ) 419 1.1 christos (unit u-media-3-dual "Media-3-dual unit" () 420 1.1 christos 1 1 ; issue done 421 1.1 christos () ; state 422 1.1 christos ((FRinti INT -1)) ; inputs 423 1.1 christos ((FRintk INT -1)) ; outputs 424 1.1 christos () ; profile action (default) 425 1.1 christos ) 426 1.1 christos (unit u-media-3-acc "Media unit for M-3 using ACC" () 427 1.1 christos 1 1 ; issue done 428 1.1 christos () ; state 429 1.1 christos ((FRintj INT -1) (ACC40Si INT -1)) ; inputs 430 1.1 christos ((FRintk INT -1)) ; outputs 431 1.1 christos () ; profile action (default) 432 1.1 christos ) 433 1.1 christos (unit u-media-3-acc-dual "Media-3-acc-dual unit" () 434 1.1 christos 1 1 ; issue done 435 1.1 christos () ; state 436 1.1 christos ((ACC40Si INT -1)) ; inputs 437 1.1 christos ((FRintkeven INT -1)) ; outputs 438 1.1 christos () ; profile action (default) 439 1.1 christos ) 440 1.1 christos (unit u-media-3-wtacc "Media-3-wtacc unit" () 441 1.1 christos 1 1 ; issue done 442 1.1 christos () ; state 443 1.1 christos ((FRinti INT -1) (ACC40Sk INT -1)) ; inputs 444 1.1 christos () ; outputs 445 1.1 christos () ; profile action (default) 446 1.1 christos ) 447 1.1 christos (unit u-media-3-mclracc "Media-3-mclracc unit" () 448 1.1 christos 1 1 ; issue done 449 1.1 christos () ; state 450 1.1 christos () ; inputs 451 1.1 christos () ; outputs 452 1.1 christos () ; profile action (default) 453 1.1 christos ) 454 1.1 christos (unit u-media-set "Media set" () 455 1.1 christos 1 1 ; issue done 456 1.1 christos () ; state 457 1.1 christos () ; inputs 458 1.1 christos ((FRintk INT -1)) ; outputs 459 1.1 christos () ; profile action (default) 460 1.1 christos ) 461 1.1 christos (unit u-media-4 "Media-4 unit" () 462 1.1 christos 1 1 ; issue done 463 1.1 christos () ; state 464 1.1 christos ((FRinti INT -1) (FRintj INT -1)) ; inputs 465 1.1 christos ((ACC40Sk INT -1) (ACC40Uk INT -1)) ; outputs 466 1.1 christos () ; profile action (default) 467 1.1 christos ) 468 1.1 christos (unit u-media-4-acc "Media-4-acc unit" () 469 1.1 christos 1 1 ; issue done 470 1.1 christos () ; state 471 1.1 christos ((ACC40Si INT -1)) ; inputs 472 1.1 christos ((ACC40Sk INT -1)) ; outputs 473 1.1 christos () ; profile action (default) 474 1.1 christos ) 475 1.1 christos (unit u-media-4-acc-dual "Media-4-acc-dual unit" () 476 1.1 christos 1 1 ; issue done 477 1.1 christos () ; state 478 1.1 christos ((ACC40Si INT -1)) ; inputs 479 1.1 christos ((ACC40Sk INT -1)) ; outputs 480 1.1 christos () ; profile action (default) 481 1.1 christos ) 482 1.1 christos (unit u-media-4-add-sub "Media-4-add-sub unit" () 483 1.1 christos 1 1 ; issue done 484 1.1 christos () ; state 485 1.1 christos ((ACC40Si INT -1)) ; inputs 486 1.1 christos ((ACC40Sk INT -1)) ; outputs 487 1.1 christos () ; profile action (default) 488 1.1 christos ) 489 1.1 christos (unit u-media-4-add-sub-dual "Media-4-add-sub-dual unit" () 490 1.1 christos 1 1 ; issue done 491 1.1 christos () ; state 492 1.1 christos ((ACC40Si INT -1)) ; inputs 493 1.1 christos ((ACC40Sk INT -1)) ; outputs 494 1.1 christos () ; profile action (default) 495 1.1 christos ) 496 1.1 christos (unit u-media-4-quad "Media-4-quad unit" () 497 1.1 christos 1 1 ; issue done 498 1.1 christos () ; state 499 1.1 christos ((FRintieven INT -1) (FRintjeven INT -1)) ; inputs 500 1.1 christos ((ACC40Sk INT -1) (ACC40Uk INT -1)) ; outputs 501 1.1 christos () ; profile action (default) 502 1.1 christos ) 503 1.1 christos ) 504 1.1 christos 505 1.1 christos ; FR500 machine. 506 1.1 christos (define-mach 507 1.1 christos (name fr500) 508 1.1 christos (comment "FR500 cpu") 509 1.1 christos (cpu frvbf) 510 1.1 christos ) 511 1.1 christos (define-model 512 1.1 christos (name fr500) (comment "FR500 model") (attrs) 513 1.1 christos (mach fr500) 514 1.1 christos 515 1.1 christos (pipeline all "" () ((fetch) (decode) (execute) (writeback))) 516 1.1 christos 517 1.1 christos ; `state' is a list of variables for recording model state 518 1.1 christos (state 519 1.1 christos ; State items 520 1.1 christos ; These are all masks with each bit representing one register. 521 1.1 christos (prev-fpop DI) ; Previous use of FR register was floating point insn 522 1.1 christos (prev-media DI) ; Previous use of FR register was a media insn 523 1.1 christos (prev-cc-complex DI) ; Previous use of ICC register was not simple 524 1.1 christos (cur-fpop DI) ; Current use of FR register was floating point insn 525 1.1 christos (cur-media DI) ; Current use of FR register was a media insn 526 1.1 christos (cur-cc-complex DI) ; Current use of ICC register was not simple 527 1.1 christos ) 528 1.1 christos ; Basic unit for instructions with no latency penalties 529 1.1 christos (unit u-exec "Execution Unit" () 530 1.1 christos 1 1 ; issue done 531 1.1 christos () ; state 532 1.1 christos () ; inputs 533 1.1 christos () ; outputs 534 1.1 christos () ; profile action (default) 535 1.1 christos ) 536 1.1 christos ; Basic integer insn unit 537 1.1 christos (unit u-integer "Integer Unit" () 538 1.1 christos 1 1 ; issue done 539 1.1 christos () ; state 540 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 541 1.1 christos ((GRk INT -1) (ICCi_1 INT -1)) ; outputs 542 1.1 christos () ; profile action (default) 543 1.1 christos ) 544 1.1 christos ; Integer multiplication unit 545 1.1 christos (unit u-imul "Integer Multiplication Unit" () 546 1.1 christos 1 1 ; issue done 547 1.1 christos () ; state 548 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 549 1.1 christos ((GRdoublek INT -1) (ICCi_1 INT -1)) ; outputs 550 1.1 christos () ; profile action (default) 551 1.1 christos ) 552 1.1 christos ; Integer division unit 553 1.1 christos (unit u-idiv "Integer Division Unit" () 554 1.1 christos 1 1 ; issue done 555 1.1 christos () ; state 556 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 557 1.1 christos ((GRk INT -1) (ICCi_1 INT -1)) ; outputs 558 1.1 christos () ; profile action (default) 559 1.1 christos ) 560 1.1 christos ; Branch unit 561 1.1 christos (unit u-branch "Branch Unit" () 562 1.1 christos 1 1 ; issue done 563 1.1 christos () ; state 564 1.1 christos ((GRi INT -1) (GRj INT -1) 565 1.1 christos (ICCi_2 INT -1) (FCCi_2 INT -1)) ; inputs 566 1.1 christos ((pc)) ; outputs 567 1.1 christos () ; profile action (default) 568 1.1 christos ) 569 1.1 christos ; Trap unit 570 1.1 christos (unit u-trap "Trap Unit" () 571 1.1 christos 1 1 ; issue done 572 1.1 christos () ; state 573 1.1 christos ((GRi INT -1) (GRj INT -1) 574 1.1 christos (ICCi_2 INT -1) (FCCi_2 INT -1)) ; inputs 575 1.1 christos () ; outputs 576 1.1 christos () ; profile action (default) 577 1.1 christos ) 578 1.1 christos ; Condition code check unit 579 1.1 christos (unit u-check "Check Unit" () 580 1.1 christos 1 1 ; issue done 581 1.1 christos () ; state 582 1.1 christos ((ICCi_3 INT -1) (FCCi_3 INT -1)) ; inputs 583 1.1 christos () ; outputs 584 1.1 christos () ; profile action (default) 585 1.1 christos ) 586 1.1 christos ; Clrgr unit 587 1.1 christos (unit u-clrgr "Clrgr Unit" () 588 1.1 christos 1 1 ; issue done 589 1.1 christos () ; state 590 1.1 christos ((GRk INT -1)) ; inputs 591 1.1 christos () ; outputs 592 1.1 christos () ; profile action (default) 593 1.1 christos ) 594 1.1 christos ; Clrfr unit 595 1.1 christos (unit u-clrfr "Clrfr Unit" () 596 1.1 christos 1 1 ; issue done 597 1.1 christos () ; state 598 1.1 christos ((FRk INT -1)) ; inputs 599 1.1 christos () ; outputs 600 1.1 christos () ; profile action (default) 601 1.1 christos ) 602 1.1 christos ; GR set half unit 603 1.1 christos (unit u-set-hilo "GR Set Half" () 604 1.1 christos 1 1 ; issue done 605 1.1 christos () ; state 606 1.1 christos () ; inputs 607 1.1 christos ((GRkhi INT -1) (GRklo INT -1)) ; outputs 608 1.1 christos () ; profile action (default) 609 1.1 christos ) 610 1.1 christos ; GR load unit -- TODO doesn't handle quad 611 1.1 christos (unit u-gr-load "GR Load Unit" () 612 1.1 christos 1 1 ; issue done 613 1.1 christos () ; state 614 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 615 1.1 christos ((GRk INT -1) (GRdoublek INT -1)) ; outputs 616 1.1 christos () ; profile action (default) 617 1.1 christos ) 618 1.1 christos ; GR store unit -- TODO doesn't handle quad 619 1.1 christos (unit u-gr-store "GR Store Unit" () 620 1.1 christos 1 1 ; issue done 621 1.1 christos () ; state 622 1.1 christos ((GRi INT -1) (GRj INT -1) (GRk INT -1) (GRdoublek INT -1)) ; inputs 623 1.1 christos () ; outputs 624 1.1 christos () ; profile action (default) 625 1.1 christos ) 626 1.1 christos ; GR recovering store unit -- TODO doesn't handle quad 627 1.1 christos (unit u-gr-r-store "GR Recovering Store Unit" () 628 1.1 christos 1 1 ; issue done 629 1.1 christos () ; state 630 1.1 christos ((GRi INT -1) (GRj INT -1) (GRk INT -1) (GRdoublek INT -1)) ; inputs 631 1.1 christos () ; outputs 632 1.1 christos () ; profile action (default) 633 1.1 christos ) 634 1.1 christos ; FR load unit -- TODO doesn't handle quad 635 1.1 christos (unit u-fr-load "FR Load Unit" () 636 1.1 christos 1 1 ; issue done 637 1.1 christos () ; state 638 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 639 1.1 christos ((FRintk INT -1) (FRdoublek INT -1)) ; outputs 640 1.1 christos () ; profile action (default) 641 1.1 christos ) 642 1.1 christos ; FR store unit -- TODO doesn't handle quad 643 1.1 christos (unit u-fr-store "FR Store Unit" () 644 1.1 christos 1 1 ; issue done 645 1.1 christos () ; state 646 1.1 christos ((GRi INT -1) (GRj INT -1) (FRintk INT -1) (FRdoublek INT -1)) ; inputs 647 1.1 christos () ; outputs 648 1.1 christos () ; profile action (default) 649 1.1 christos ) 650 1.1 christos ; FR recovering store unit -- TODO doesn't handle quad 651 1.1 christos (unit u-fr-r-store "FR Recovering Store Unit" () 652 1.1 christos 1 1 ; issue done 653 1.1 christos () ; state 654 1.1 christos ((GRi INT -1) (GRj INT -1) (FRintk INT -1) (FRdoublek INT -1)) ; inputs 655 1.1 christos () ; outputs 656 1.1 christos () ; profile action (default) 657 1.1 christos ) 658 1.1 christos ; Swap unit 659 1.1 christos (unit u-swap "Swap Unit" () 660 1.1 christos 1 1 ; issue done 661 1.1 christos () ; state 662 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 663 1.1 christos ((GRk INT -1)) ; outputs 664 1.1 christos () ; profile action (default) 665 1.1 christos ) 666 1.1 christos ; FR Move to FR unit 667 1.1 christos (unit u-fr2fr "FR Move to FR Unit" () 668 1.1 christos 1 1 ; issue done 669 1.1 christos () ; state 670 1.1 christos ((FRi INT -1)) ; inputs 671 1.1 christos ((FRk INT -1)) ; outputs 672 1.1 christos () ; profile action (default) 673 1.1 christos ) 674 1.1 christos ; FR Move to GR unit 675 1.1 christos (unit u-fr2gr "FR Move to GR Unit" () 676 1.1 christos 1 1 ; issue done 677 1.1 christos () ; state 678 1.1 christos ((FRintk INT -1)) ; inputs 679 1.1 christos ((GRj INT -1)) ; outputs 680 1.1 christos () ; profile action (default) 681 1.1 christos ) 682 1.1 christos ; SPR Move to GR unit 683 1.1 christos (unit u-spr2gr "SPR Move to GR Unit" () 684 1.1 christos 1 1 ; issue done 685 1.1 christos () ; state 686 1.1 christos ((spr INT -1)) ; inputs 687 1.1 christos ((GRj INT -1)) ; outputs 688 1.1 christos () ; profile action (default) 689 1.1 christos ) 690 1.1 christos ; GR Move to FR unit 691 1.1 christos (unit u-gr2fr "GR Move to FR Unit" () 692 1.1 christos 1 1 ; issue done 693 1.1 christos () ; state 694 1.1 christos ((GRj INT -1)) ; inputs 695 1.1 christos ((FRintk INT -1)) ; outputs 696 1.1 christos () ; profile action (default) 697 1.1 christos ) 698 1.1 christos ; GR Move to SPR unit 699 1.1 christos (unit u-gr2spr "GR Move to SPR Unit" () 700 1.1 christos 1 1 ; issue done 701 1.1 christos () ; state 702 1.1 christos ((GRj INT -1)) ; inputs 703 1.1 christos ((spr INT -1)) ; outputs 704 1.1 christos () ; profile action (default) 705 1.1 christos ) 706 1.1 christos ; Float Arithmetic unit 707 1.1 christos (unit u-float-arith "Float Arithmetic unit" () 708 1.1 christos 1 1 ; issue done 709 1.1 christos () ; state 710 1.1 christos ((FRi INT -1) (FRj INT -1) ; inputs 711 1.1 christos (FRdoublei INT -1) (FRdoublej INT -1)) ; inputs 712 1.1 christos ((FRk INT -1) (FRdoublek INT -1)) ; outputs 713 1.1 christos () ; profile action (default) 714 1.1 christos ) 715 1.1 christos ; Float Dual Arithmetic unit 716 1.1 christos (unit u-float-dual-arith "Float Arithmetic unit" () 717 1.1 christos 1 1 ; issue done 718 1.1 christos () ; state 719 1.1 christos ((FRi INT -1) (FRj INT -1) ; inputs 720 1.1 christos (FRdoublei INT -1) (FRdoublej INT -1)) ; inputs 721 1.1 christos ((FRk INT -1) (FRdoublek INT -1)) ; outputs 722 1.1 christos () ; profile action (default) 723 1.1 christos ) 724 1.1 christos ; Float Div unit 725 1.1 christos (unit u-float-div "Float Div unit" () 726 1.1 christos 1 1 ; issue done 727 1.1 christos () ; state 728 1.1 christos ((FRi INT -1) (FRj INT -1)) ; inputs 729 1.1 christos ((FRk INT -1)) ; outputs 730 1.1 christos () ; profile action (default) 731 1.1 christos ) 732 1.1 christos ; Float Square Root unit 733 1.1 christos (unit u-float-sqrt "Float Square Root unit" () 734 1.1 christos 1 1 ; issue done 735 1.1 christos () ; state 736 1.1 christos ((FRj INT -1) (FRdoublej INT -1)) ; inputs 737 1.1 christos ((FRk INT -1) (FRdoublek INT -1)) ; outputs 738 1.1 christos () ; profile action (default) 739 1.1 christos ) 740 1.1 christos ; Float Dual Square Root unit 741 1.1 christos (unit u-float-dual-sqrt "Float Dual Square Root unit" () 742 1.1 christos 1 1 ; issue done 743 1.1 christos () ; state 744 1.1 christos ((FRj INT -1)) ; inputs 745 1.1 christos ((FRk INT -1)) ; outputs 746 1.1 christos () ; profile action (default) 747 1.1 christos ) 748 1.1 christos ; Float Compare unit 749 1.1 christos (unit u-float-compare "Float Compare unit" () 750 1.1 christos 1 1 ; issue done 751 1.1 christos () ; state 752 1.1 christos ((FRi INT -1) (FRj INT -1) 753 1.1 christos (FRdoublei INT -1) (FRdoublej INT -1)) ; inputs 754 1.1 christos ((FCCi_2 INT -1)) ; outputs 755 1.1 christos () ; profile action (default) 756 1.1 christos ) 757 1.1 christos ; Dual Float Compare unit 758 1.1 christos (unit u-float-dual-compare "Float Dual Compare unit" () 759 1.1 christos 1 1 ; issue done 760 1.1 christos () ; state 761 1.1 christos ((FRi INT -1) (FRj INT -1)) ; inputs 762 1.1 christos ((FCCi_2 INT -1)) ; outputs 763 1.1 christos () ; profile action (default) 764 1.1 christos ) 765 1.1 christos ; Float Conversion unit 766 1.1 christos (unit u-float-convert "Float Conversion unit" () 767 1.1 christos 1 1 ; issue done 768 1.1 christos () ; state 769 1.1 christos ((FRj INT -1) (FRintj INT -1) (FRdoublej INT -1)) ; inputs 770 1.1 christos ((FRk INT -1) (FRintk INT -1) (FRdoublek INT -1)) ; outputs 771 1.1 christos () ; profile action (default) 772 1.1 christos ) 773 1.1 christos ; Dual Float Conversion unit 774 1.1 christos (unit u-float-dual-convert "Float Dual Conversion unit" () 775 1.1 christos 1 1 ; issue done 776 1.1 christos () ; state 777 1.1 christos ((FRj INT -1) (FRintj INT -1)) ; inputs 778 1.1 christos ((FRk INT -1) (FRintk INT -1)) ; outputs 779 1.1 christos () ; profile action (default) 780 1.1 christos ) 781 1.1 christos ; Media unit 782 1.1 christos (unit u-media "Media unit" () 783 1.1 christos 1 1 ; issue done 784 1.1 christos () ; state 785 1.1 christos ((FRinti INT -1) (FRintj INT -1) (ACC40Si INT -1) (ACCGi INT -1)) ; inputs 786 1.1 christos ((FRintk INT -1) (ACC40Sk INT -1) (ACC40Uk INT -1) (ACCGk INT -1)) ; outputs 787 1.1 christos () ; profile action (default) 788 1.1 christos ) 789 1.1 christos ; Media Quad Arithmetic unit 790 1.1 christos (unit u-media-quad-arith "Media Quad Arithmetic unit" () 791 1.1 christos 1 1 ; issue done 792 1.1 christos () ; state 793 1.1 christos ((FRinti INT -1) (FRintj INT -1)) ; inputs 794 1.1 christos ((FRintk INT -1)) ; outputs 795 1.1 christos () ; profile action (default) 796 1.1 christos ) 797 1.1 christos ; Media Dual Multiplication unit 798 1.1 christos (unit u-media-dual-mul "Media Dual Multiplication unit" () 799 1.1 christos 1 1 ; issue done 800 1.1 christos () ; state 801 1.1 christos ((FRinti INT -1) (FRintj INT -1)) ; inputs 802 1.1 christos ((ACC40Sk INT -1) (ACC40Uk INT -1)) ; outputs 803 1.1 christos () ; profile action (default) 804 1.1 christos ) 805 1.1 christos ; Media Quad Multiplication unit 806 1.1 christos (unit u-media-quad-mul "Media Quad Multiplication unit" () 807 1.1 christos 1 1 ; issue done 808 1.1 christos () ; state 809 1.1 christos ((FRinti INT -1) (FRintj INT -1)) ; inputs 810 1.1 christos ((ACC40Sk INT -1) (ACC40Uk INT -1)) ; outputs 811 1.1 christos () ; profile action (default) 812 1.1 christos ) 813 1.1 christos ; Media Quad Complex unit 814 1.1 christos (unit u-media-quad-complex "Media Quad Complex unit" () 815 1.1 christos 1 1 ; issue done 816 1.1 christos () ; state 817 1.1 christos ((FRinti INT -1) (FRintj INT -1)) ; inputs 818 1.1 christos ((ACC40Sk INT -1)) ; outputs 819 1.1 christos () ; profile action (default) 820 1.1 christos ) 821 1.1 christos ; Media Dual Expand unit 822 1.1 christos (unit u-media-dual-expand "Media Dual Expand unit" () 823 1.1 christos 1 1 ; issue done 824 1.1 christos () ; state 825 1.1 christos ((FRinti INT -1)) ; inputs 826 1.1 christos ((FRintk INT -1)) ; outputs 827 1.1 christos () ; profile action (default) 828 1.1 christos ) 829 1.1 christos ; Media Dual Unpack unit 830 1.1 christos (unit u-media-dual-unpack "Media Dual Unpack unit" () 831 1.1 christos 1 1 ; issue done 832 1.1 christos () ; state 833 1.1 christos ((FRinti INT -1)) ; inputs 834 1.1 christos ((FRintk INT -1)) ; outputs 835 1.1 christos () ; profile action (default) 836 1.1 christos ) 837 1.1 christos ; Media Dual byte to half unit 838 1.1 christos (unit u-media-dual-btoh "Media Byte to byte" () 839 1.1 christos 1 1 ; issue done 840 1.1 christos () ; state 841 1.1 christos ((FRintj INT -1)) ; inputs 842 1.1 christos ((FRintk INT -1)) ; outputs 843 1.1 christos () ; profile action (default) 844 1.1 christos ) 845 1.1 christos ; Media Dual half to byte unit 846 1.1 christos (unit u-media-dual-htob "Media Half to byte" () 847 1.1 christos 1 1 ; issue done 848 1.1 christos () ; state 849 1.1 christos ((FRintj INT -1)) ; inputs 850 1.1 christos ((FRintk INT -1)) ; outputs 851 1.1 christos () ; profile action (default) 852 1.1 christos ) 853 1.1 christos ; Media Dual byte to half unit extended 854 1.1 christos (unit u-media-dual-btohe "Media Byte to byte extended" () 855 1.1 christos 1 1 ; issue done 856 1.1 christos () ; state 857 1.1 christos ((FRintj INT -1)) ; inputs 858 1.1 christos ((FRintk INT -1)) ; outputs 859 1.1 christos () ; profile action (default) 860 1.1 christos ) 861 1.1 christos ; Barrier unit 862 1.1 christos (unit u-barrier "Barrier unit" () 863 1.1 christos 1 1 ; issue done 864 1.1 christos () ; state 865 1.1 christos () ; inputs 866 1.1 christos () ; outputs 867 1.1 christos () ; profile action (default) 868 1.1 christos ) 869 1.1 christos ; Memory Barrier unit 870 1.1 christos (unit u-membar "Memory Barrier unit" () 871 1.1 christos 1 1 ; issue done 872 1.1 christos () ; state 873 1.1 christos () ; inputs 874 1.1 christos () ; outputs 875 1.1 christos () ; profile action (default) 876 1.1 christos ) 877 1.1 christos ; Insn cache invalidate unit 878 1.1 christos (unit u-ici "Insn cache invalidate unit" () 879 1.1 christos 1 1 ; issue done 880 1.1 christos () ; state 881 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 882 1.1 christos () ; outputs 883 1.1 christos () ; profile action (default) 884 1.1 christos ) 885 1.1 christos ; Data cache invalidate unit 886 1.1 christos (unit u-dci "Data cache invalidate unit" () 887 1.1 christos 1 1 ; issue done 888 1.1 christos () ; state 889 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 890 1.1 christos () ; outputs 891 1.1 christos () ; profile action (default) 892 1.1 christos ) 893 1.1 christos ; Data cache flush unit 894 1.1 christos (unit u-dcf "Data cache flush unit" () 895 1.1 christos 1 1 ; issue done 896 1.1 christos () ; state 897 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 898 1.1 christos () ; outputs 899 1.1 christos () ; profile action (default) 900 1.1 christos ) 901 1.1 christos ; Insn cache preload unit 902 1.1 christos (unit u-icpl "Insn cache preload unit" () 903 1.1 christos 1 1 ; issue done 904 1.1 christos () ; state 905 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 906 1.1 christos () ; outputs 907 1.1 christos () ; profile action (default) 908 1.1 christos ) 909 1.1 christos ; Data cache preload unit 910 1.1 christos (unit u-dcpl "Data cache preload unit" () 911 1.1 christos 1 1 ; issue done 912 1.1 christos () ; state 913 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 914 1.1 christos () ; outputs 915 1.1 christos () ; profile action (default) 916 1.1 christos ) 917 1.1 christos ; Insn cache unlock unit 918 1.1 christos (unit u-icul "Insn cache unlock unit" () 919 1.1 christos 1 1 ; issue done 920 1.1 christos () ; state 921 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 922 1.1 christos () ; outputs 923 1.1 christos () ; profile action (default) 924 1.1 christos ) 925 1.1 christos ; Data cache unlock unit 926 1.1 christos (unit u-dcul "Data cache unlock unit" () 927 1.1 christos 1 1 ; issue done 928 1.1 christos () ; state 929 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 930 1.1 christos () ; outputs 931 1.1 christos () ; profile action (default) 932 1.1 christos ) 933 1.1 christos ; commit unit 934 1.1 christos (unit u-commit "Commit Unit" () 935 1.1 christos 1 1 ; issue done 936 1.1 christos () ; state 937 1.1 christos ((GRk INT -1) (FRk INT -1)) ; inputs 938 1.1 christos () ; outputs 939 1.1 christos () ; profile action (default) 940 1.1 christos ) 941 1.1 christos ) 942 1.1 christos 944 1.1 christos ; Tomcat machine. Early version of fr500 machine 945 1.1 christos (define-mach 946 1.1 christos (name tomcat) 947 1.1 christos (comment "Tomcat -- early version of fr500") 948 1.1 christos (cpu frvbf) 949 1.1 christos ) 950 1.1 christos (define-model 951 1.1 christos (name tomcat) (comment "Tomcat model") (attrs) 952 1.1 christos (mach tomcat) 953 1.1 christos 954 1.1 christos (pipeline all "" () ((fetch) (decode) (execute) (writeback))) 955 1.1 christos 956 1.1 christos ; `state' is a list of variables for recording model state 957 1.1 christos ; (state) 958 1.1 christos 959 1.1 christos (unit u-exec "Execution Unit" () 960 1.1 christos 1 1 ; issue done 961 1.1 christos () ; state 962 1.1 christos () ; inputs 963 1.1 christos () ; outputs 964 1.1 christos () ; profile action (default) 965 1.1 christos ) 966 1.1 christos ) 967 1.1 christos 969 1.1 christos ; FR400 machine 970 1.1 christos (define-mach 971 1.1 christos (name fr400) 972 1.1 christos (comment "FR400 cpu") 973 1.1 christos (cpu frvbf) 974 1.1 christos ) 975 1.1 christos (define-model 976 1.1 christos (name fr400) (comment "FR400 model") (attrs) 977 1.1 christos (mach fr400) 978 1.1 christos (pipeline all "" () ((fetch) (decode) (execute) (writeback))) 979 1.1 christos ; `state' is a list of variables for recording model state 980 1.1 christos (state 981 1.1 christos ; State items 982 1.1 christos ; These are all masks with each bit representing one register. 983 1.1 christos (prev-fp-load DI) ; Previous use of FR register was floating point load 984 1.1 christos (prev-fr-p4 DI) ; Previous use of FR register was media unit 4 985 1.1 christos (prev-fr-p6 DI) ; Previous use of FR register was media unit 6 986 1.1 christos (prev-acc-p2 DI) ; Previous use of ACC register was media unit 2 987 1.1 christos (prev-acc-p4 DI) ; Previous use of ACC register was media unit 4 988 1.1 christos (cur-fp-load DI) ; Current use of FR register is floating point load 989 1.1 christos (cur-fr-p4 DI) ; Current use of FR register is media unit 4 990 1.1 christos (cur-fr-p6 DI) ; Current use of FR register is media unit 6 991 1.1 christos (cur-acc-p2 DI) ; Current use of ACC register is media unit 2 992 1.1 christos (cur-acc-p4 DI) ; Current use of ACC register is media unit 4 993 1.1 christos ) 994 1.1 christos (unit u-exec "Execution Unit" () 995 1.1 christos 1 1 ; issue done 996 1.1 christos () ; state 997 1.1 christos () ; inputs 998 1.1 christos () ; outputs 999 1.1 christos () ; profile action (default) 1000 1.1 christos ) 1001 1.1 christos ; Basic integer insn unit 1002 1.1 christos (unit u-integer "Integer Unit" () 1003 1.1 christos 1 1 ; issue done 1004 1.1 christos () ; state 1005 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1006 1.1 christos ((GRk INT -1) (ICCi_1 INT -1)) ; outputs 1007 1.1 christos () ; profile action (default) 1008 1.1 christos ) 1009 1.1 christos ; Integer multiplication unit 1010 1.1 christos (unit u-imul "Integer Multiplication Unit" () 1011 1.1 christos 1 1 ; issue done 1012 1.1 christos () ; state 1013 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1014 1.1 christos ((GRdoublek INT -1) (ICCi_1 INT -1)) ; outputs 1015 1.1 christos () ; profile action (default) 1016 1.1 christos ) 1017 1.1 christos ; Integer division unit 1018 1.1 christos (unit u-idiv "Integer Division Unit" () 1019 1.1 christos 1 1 ; issue done 1020 1.1 christos () ; state 1021 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1022 1.1 christos ((GRk INT -1) (ICCi_1 INT -1)) ; outputs 1023 1.1 christos () ; profile action (default) 1024 1.1 christos ) 1025 1.1 christos ; Branch unit 1026 1.1 christos (unit u-branch "Branch Unit" () 1027 1.1 christos 1 1 ; issue done 1028 1.1 christos () ; state 1029 1.1 christos ((GRi INT -1) (GRj INT -1) 1030 1.1 christos (ICCi_2 INT -1) (FCCi_2 INT -1)) ; inputs 1031 1.1 christos ((pc)) ; outputs 1032 1.1 christos () ; profile action (default) 1033 1.1 christos ) 1034 1.1 christos ; Trap unit 1035 1.1 christos (unit u-trap "Trap Unit" () 1036 1.1 christos 1 1 ; issue done 1037 1.1 christos () ; state 1038 1.1 christos ((GRi INT -1) (GRj INT -1) 1039 1.1 christos (ICCi_2 INT -1) (FCCi_2 INT -1)) ; inputs 1040 1.1 christos () ; outputs 1041 1.1 christos () ; profile action (default) 1042 1.1 christos ) 1043 1.1 christos ; Condition code check unit 1044 1.1 christos (unit u-check "Check Unit" () 1045 1.1 christos 1 1 ; issue done 1046 1.1 christos () ; state 1047 1.1 christos ((ICCi_3 INT -1) (FCCi_3 INT -1)) ; inputs 1048 1.1 christos () ; outputs 1049 1.1 christos () ; profile action (default) 1050 1.1 christos ) 1051 1.1 christos ; GR set half unit 1052 1.1 christos (unit u-set-hilo "GR Set Half" () 1053 1.1 christos 1 1 ; issue done 1054 1.1 christos () ; state 1055 1.1 christos () ; inputs 1056 1.1 christos ((GRkhi INT -1) (GRklo INT -1)) ; outputs 1057 1.1 christos () ; profile action (default) 1058 1.1 christos ) 1059 1.1 christos ; GR load unit -- TODO doesn't handle quad 1060 1.1 christos (unit u-gr-load "GR Load Unit" () 1061 1.1 christos 1 1 ; issue done 1062 1.1 christos () ; state 1063 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1064 1.1 christos ((GRk INT -1) (GRdoublek INT -1)) ; outputs 1065 1.1 christos () ; profile action (default) 1066 1.1 christos ) 1067 1.1 christos ; GR store unit -- TODO doesn't handle quad 1068 1.1 christos (unit u-gr-store "GR Store Unit" () 1069 1.1 christos 1 1 ; issue done 1070 1.1 christos () ; state 1071 1.1 christos ((GRi INT -1) (GRj INT -1) (GRk INT -1) (GRdoublek INT -1)) ; inputs 1072 1.1 christos () ; outputs 1073 1.1 christos () ; profile action (default) 1074 1.1 christos ) 1075 1.1 christos ; FR load unit -- TODO doesn't handle quad 1076 1.1 christos (unit u-fr-load "FR Load Unit" () 1077 1.1 christos 1 1 ; issue done 1078 1.1 christos () ; state 1079 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1080 1.1 christos ((FRintk INT -1) (FRdoublek INT -1)) ; outputs 1081 1.1 christos () ; profile action (default) 1082 1.1 christos ) 1083 1.1 christos ; FR store unit -- TODO doesn't handle quad 1084 1.1 christos (unit u-fr-store "FR Store Unit" () 1085 1.1 christos 1 1 ; issue done 1086 1.1 christos () ; state 1087 1.1 christos ((GRi INT -1) (GRj INT -1) (FRintk INT -1) (FRdoublek INT -1)) ; inputs 1088 1.1 christos () ; outputs 1089 1.1 christos () ; profile action (default) 1090 1.1 christos ) 1091 1.1 christos ; Swap unit 1092 1.1 christos (unit u-swap "Swap Unit" () 1093 1.1 christos 1 1 ; issue done 1094 1.1 christos () ; state 1095 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1096 1.1 christos ((GRk INT -1)) ; outputs 1097 1.1 christos () ; profile action (default) 1098 1.1 christos ) 1099 1.1 christos ; FR Move to GR unit 1100 1.1 christos (unit u-fr2gr "FR Move to GR Unit" () 1101 1.1 christos 1 1 ; issue done 1102 1.1 christos () ; state 1103 1.1 christos ((FRintk INT -1)) ; inputs 1104 1.1 christos ((GRj INT -1)) ; outputs 1105 1.1 christos () ; profile action (default) 1106 1.1 christos ) 1107 1.1 christos ; SPR Move to GR unit 1108 1.1 christos (unit u-spr2gr "SPR Move to GR Unit" () 1109 1.1 christos 1 1 ; issue done 1110 1.1 christos () ; state 1111 1.1 christos ((spr INT -1)) ; inputs 1112 1.1 christos ((GRj INT -1)) ; outputs 1113 1.1 christos () ; profile action (default) 1114 1.1 christos ) 1115 1.1 christos ; GR Move to FR unit 1116 1.1 christos (unit u-gr2fr "GR Move to FR Unit" () 1117 1.1 christos 1 1 ; issue done 1118 1.1 christos () ; state 1119 1.1 christos ((GRj INT -1)) ; inputs 1120 1.1 christos ((FRintk INT -1)) ; outputs 1121 1.1 christos () ; profile action (default) 1122 1.1 christos ) 1123 1.1 christos ; GR Move to SPR unit 1124 1.1 christos (unit u-gr2spr "GR Move to SPR Unit" () 1125 1.1 christos 1 1 ; issue done 1126 1.1 christos () ; state 1127 1.1 christos ((GRj INT -1)) ; inputs 1128 1.1 christos ((spr INT -1)) ; outputs 1129 1.1 christos () ; profile action (default) 1130 1.1 christos ) 1131 1.1 christos ; Media unit M1 -- see table 13-8 in the fr400 LSI 1132 1.1 christos (unit u-media-1 "Media-1 unit" () 1133 1.1 christos 1 1 ; issue done 1134 1.1 christos () ; state 1135 1.1 christos ((FRinti INT -1) (FRintj INT -1)) ; inputs 1136 1.1 christos ((FRintk INT -1)) ; outputs 1137 1.1 christos () ; profile action (default) 1138 1.1 christos ) 1139 1.1 christos (unit u-media-1-quad "Media-1-quad unit" () 1140 1.1 christos 1 1 ; issue done 1141 1.1 christos () ; state 1142 1.1 christos ((FRinti INT -1) (FRintj INT -1)) ; inputs 1143 1.1 christos ((FRintk INT -1)) ; outputs 1144 1.1 christos () ; profile action (default) 1145 1.1 christos ) 1146 1.1 christos (unit u-media-hilo "Media-hilo unit -- a variation of the Media-1 unit" () 1147 1.1 christos 1 1 ; issue done 1148 1.1 christos () ; state 1149 1.1 christos () ; inputs 1150 1.1 christos ((FRkhi INT -1) (FRklo INT -1)) ; outputs 1151 1.1 christos () ; profile action (default) 1152 1.1 christos ) 1153 1.1 christos ; Media unit M2 -- see table 13-8 in the fr400 LSI 1154 1.1 christos (unit u-media-2 "Media-2 unit" () 1155 1.1 christos 1 1 ; issue done 1156 1.1 christos () ; state 1157 1.1 christos ((FRinti INT -1) (FRintj INT -1)) ; inputs 1158 1.1 christos ((ACC40Sk INT -1) (ACC40Uk INT -1)) ; outputs 1159 1.1 christos () ; profile action (default) 1160 1.1 christos ) 1161 1.1 christos (unit u-media-2-quad "Media-2-quad unit" () 1162 1.1 christos 1 1 ; issue done 1163 1.1 christos () ; state 1164 1.1 christos ((FRinti INT -1) (FRintj INT -1)) ; inputs 1165 1.1 christos ((ACC40Sk INT -1) (ACC40Uk INT -1)) ; outputs 1166 1.1 christos () ; profile action (default) 1167 1.1 christos ) 1168 1.1 christos (unit u-media-2-acc "Media-2-acc unit" () 1169 1.1 christos 1 1 ; issue done 1170 1.1 christos () ; state 1171 1.1 christos ((ACC40Si INT -1)) ; inputs 1172 1.1 christos ((ACC40Sk INT -1)) ; outputs 1173 1.1 christos () ; profile action (default) 1174 1.1 christos ) 1175 1.1 christos (unit u-media-2-acc-dual "Media-2-acc-dual unit" () 1176 1.1 christos 1 1 ; issue done 1177 1.1 christos () ; state 1178 1.1 christos ((ACC40Si INT -1)) ; inputs 1179 1.1 christos ((ACC40Sk INT -1)) ; outputs 1180 1.1 christos () ; profile action (default) 1181 1.1 christos ) 1182 1.1 christos (unit u-media-2-add-sub "Media-2-add-sub unit" () 1183 1.1 christos 1 1 ; issue done 1184 1.1 christos () ; state 1185 1.1 christos ((ACC40Si INT -1)) ; inputs 1186 1.1 christos ((ACC40Sk INT -1)) ; outputs 1187 1.1 christos () ; profile action (default) 1188 1.1 christos ) 1189 1.1 christos (unit u-media-2-add-sub-dual "Media-2-add-sub-dual unit" () 1190 1.1 christos 1 1 ; issue done 1191 1.1 christos () ; state 1192 1.1 christos ((ACC40Si INT -1)) ; inputs 1193 1.1 christos ((ACC40Sk INT -1)) ; outputs 1194 1.1 christos () ; profile action (default) 1195 1.1 christos ) 1196 1.1 christos ; Media unit M3 -- see table 13-8 in the fr400 LSI 1197 1.1 christos (unit u-media-3 "Media-3 unit" () 1198 1.1 christos 1 1 ; issue done 1199 1.1 christos () ; state 1200 1.1 christos ((FRinti INT -1) (FRintj INT -1)) ; inputs 1201 1.1 christos ((FRintk INT -1)) ; outputs 1202 1.1 christos () ; profile action (default) 1203 1.1 christos ) 1204 1.1 christos (unit u-media-3-dual "Media-3-dual unit" () 1205 1.1 christos 1 1 ; issue done 1206 1.1 christos () ; state 1207 1.1 christos ((FRinti INT -1)) ; inputs 1208 1.1 christos ((FRintk INT -1)) ; outputs 1209 1.1 christos () ; profile action (default) 1210 1.1 christos ) 1211 1.1 christos (unit u-media-3-quad "Media-3-quad unit" () 1212 1.1 christos 1 1 ; issue done 1213 1.1 christos () ; state 1214 1.1 christos ((FRinti INT -1) (FRintj INT -1)) ; inputs 1215 1.1 christos ((FRintk INT -1)) ; outputs 1216 1.1 christos () ; profile action (default) 1217 1.1 christos ) 1218 1.1 christos ; Media unit M4 -- see table 13-8 in the fr400 LSI 1219 1.1 christos (unit u-media-4 "Media-4 unit" () 1220 1.1 christos 1 1 ; issue done 1221 1.1 christos () ; state 1222 1.1 christos ((ACC40Si INT -1) (FRintj INT -1)) ; inputs 1223 1.1 christos ((ACC40Sk INT -1) (FRintk INT -1)) ; outputs 1224 1.1 christos () ; profile action (default) 1225 1.1 christos ) 1226 1.1 christos (unit u-media-4-accg "Media-4-accg unit" () 1227 1.1 christos 1 1 ; issue done 1228 1.1 christos () ; state 1229 1.1 christos ((ACCGi INT -1) (FRinti INT -1)) ; inputs 1230 1.1 christos ((ACCGk INT -1) (FRintk INT -1)) ; outputs 1231 1.1 christos () ; profile action (default) 1232 1.1 christos ) 1233 1.1 christos (unit u-media-4-acc-dual "Media-4-acc-dual unit" () 1234 1.1 christos 1 1 ; issue done 1235 1.1 christos () ; state 1236 1.1 christos ((ACC40Si INT -1)) ; inputs 1237 1.1 christos ((FRintk INT -1)) ; outputs 1238 1.1 christos () ; profile action (default) 1239 1.1 christos ) 1240 1.1 christos ; Media unit M6 -- see table 13-8 in the fr400 LSI 1241 1.1 christos (unit u-media-6 "Media-6 unit" () 1242 1.1 christos 1 1 ; issue done 1243 1.1 christos () ; state 1244 1.1 christos ((FRinti INT -1)) ; inputs 1245 1.1 christos ((FRintk INT -1)) ; outputs 1246 1.1 christos () ; profile action (default) 1247 1.1 christos ) 1248 1.1 christos ; Media unit M7 -- see table 13-8 in the fr400 LSI 1249 1.1 christos (unit u-media-7 "Media-1 unit" () 1250 1.1 christos 1 1 ; issue done 1251 1.1 christos () ; state 1252 1.1 christos ((FRinti INT -1) (FRintj INT -1)) ; inputs 1253 1.1 christos ((FCCk INT -1)) ; outputs 1254 1.1 christos () ; profile action (default) 1255 1.1 christos ) 1256 1.1 christos ; Media Dual Expand unit 1257 1.1 christos (unit u-media-dual-expand "Media Dual Expand unit" () 1258 1.1 christos 1 1 ; issue done 1259 1.1 christos () ; state 1260 1.1 christos ((FRinti INT -1)) ; inputs 1261 1.1 christos ((FRintk INT -1)) ; outputs 1262 1.1 christos () ; profile action (default) 1263 1.1 christos ) 1264 1.1 christos ; Media Dual half to byte unit 1265 1.1 christos (unit u-media-dual-htob "Media Half to byte" () 1266 1.1 christos 1 1 ; issue done 1267 1.1 christos () ; state 1268 1.1 christos ((FRintj INT -1)) ; inputs 1269 1.1 christos ((FRintk INT -1)) ; outputs 1270 1.1 christos () ; profile action (default) 1271 1.1 christos ) 1272 1.1 christos ; Barrier unit 1273 1.1 christos (unit u-barrier "Barrier unit" () 1274 1.1 christos 1 1 ; issue done 1275 1.1 christos () ; state 1276 1.1 christos () ; inputs 1277 1.1 christos () ; outputs 1278 1.1 christos () ; profile action (default) 1279 1.1 christos ) 1280 1.1 christos ; Memory Barrier unit 1281 1.1 christos (unit u-membar "Memory Barrier unit" () 1282 1.1 christos 1 1 ; issue done 1283 1.1 christos () ; state 1284 1.1 christos () ; inputs 1285 1.1 christos () ; outputs 1286 1.1 christos () ; profile action (default) 1287 1.1 christos ) 1288 1.1 christos ; Insn cache invalidate unit 1289 1.1 christos (unit u-ici "Insn cache invalidate unit" () 1290 1.1 christos 1 1 ; issue done 1291 1.1 christos () ; state 1292 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1293 1.1 christos () ; outputs 1294 1.1 christos () ; profile action (default) 1295 1.1 christos ) 1296 1.1 christos ; Data cache invalidate unit 1297 1.1 christos (unit u-dci "Data cache invalidate unit" () 1298 1.1 christos 1 1 ; issue done 1299 1.1 christos () ; state 1300 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1301 1.1 christos () ; outputs 1302 1.1 christos () ; profile action (default) 1303 1.1 christos ) 1304 1.1 christos ; Data cache flush unit 1305 1.1 christos (unit u-dcf "Data cache flush unit" () 1306 1.1 christos 1 1 ; issue done 1307 1.1 christos () ; state 1308 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1309 1.1 christos () ; outputs 1310 1.1 christos () ; profile action (default) 1311 1.1 christos ) 1312 1.1 christos ; Insn cache preload unit 1313 1.1 christos (unit u-icpl "Insn cache preload unit" () 1314 1.1 christos 1 1 ; issue done 1315 1.1 christos () ; state 1316 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1317 1.1 christos () ; outputs 1318 1.1 christos () ; profile action (default) 1319 1.1 christos ) 1320 1.1 christos ; Data cache preload unit 1321 1.1 christos (unit u-dcpl "Data cache preload unit" () 1322 1.1 christos 1 1 ; issue done 1323 1.1 christos () ; state 1324 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1325 1.1 christos () ; outputs 1326 1.1 christos () ; profile action (default) 1327 1.1 christos ) 1328 1.1 christos ; Insn cache unlock unit 1329 1.1 christos (unit u-icul "Insn cache unlock unit" () 1330 1.1 christos 1 1 ; issue done 1331 1.1 christos () ; state 1332 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1333 1.1 christos () ; outputs 1334 1.1 christos () ; profile action (default) 1335 1.1 christos ) 1336 1.1 christos ; Data cache unlock unit 1337 1.1 christos (unit u-dcul "Data cache unlock unit" () 1338 1.1 christos 1 1 ; issue done 1339 1.1 christos () ; state 1340 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1341 1.1 christos () ; outputs 1342 1.1 christos () ; profile action (default) 1343 1.1 christos ) 1344 1.1 christos ) 1345 1.1 christos 1347 1.1 christos ; FR450 machine 1348 1.1 christos (define-mach 1349 1.1 christos (name fr450) 1350 1.1 christos (comment "FR450 cpu") 1351 1.1 christos (cpu frvbf) 1352 1.1 christos ) 1353 1.1 christos (define-model 1354 1.1 christos (name fr450) (comment "FR450 model") (attrs) 1355 1.1 christos (mach fr450) 1356 1.1 christos (pipeline all "" () ((fetch) (decode) (execute) (writeback))) 1357 1.1 christos ; `state' is a list of variables for recording model state 1358 1.1 christos (state 1359 1.1 christos ; State items 1360 1.1 christos ; These are all masks with each bit representing one register. 1361 1.1 christos (prev-fp-load DI) ; Previous use of FR register was floating point load 1362 1.1 christos (prev-fr-p4 DI) ; Previous use of FR register was media unit 4 1363 1.1 christos (prev-fr-p6 DI) ; Previous use of FR register was media unit 6 1364 1.1 christos (prev-acc-p2 DI) ; Previous use of ACC register was media unit 2 1365 1.1 christos (prev-acc-p4 DI) ; Previous use of ACC register was media unit 4 1366 1.1 christos (cur-fp-load DI) ; Current use of FR register is floating point load 1367 1.1 christos (cur-fr-p4 DI) ; Current use of FR register is media unit 4 1368 1.1 christos (cur-fr-p6 DI) ; Current use of FR register is media unit 6 1369 1.1 christos (cur-acc-p2 DI) ; Current use of ACC register is media unit 2 1370 1.1 christos (cur-acc-p4 DI) ; Current use of ACC register is media unit 4 1371 1.1 christos ) 1372 1.1 christos (unit u-exec "Execution Unit" () 1373 1.1 christos 1 1 ; issue done 1374 1.1 christos () ; state 1375 1.1 christos () ; inputs 1376 1.1 christos () ; outputs 1377 1.1 christos () ; profile action (default) 1378 1.1 christos ) 1379 1.1 christos ; Basic integer insn unit 1380 1.1 christos (unit u-integer "Integer Unit" () 1381 1.1 christos 1 1 ; issue done 1382 1.1 christos () ; state 1383 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1384 1.1 christos ((GRk INT -1) (ICCi_1 INT -1)) ; outputs 1385 1.1 christos () ; profile action (default) 1386 1.1 christos ) 1387 1.1 christos ; Integer multiplication unit 1388 1.1 christos (unit u-imul "Integer Multiplication Unit" () 1389 1.1 christos 1 1 ; issue done 1390 1.1 christos () ; state 1391 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1392 1.1 christos ((GRdoublek INT -1) (ICCi_1 INT -1)) ; outputs 1393 1.1 christos () ; profile action (default) 1394 1.1 christos ) 1395 1.1 christos ; Integer division unit 1396 1.1 christos (unit u-idiv "Integer Division Unit" () 1397 1.1 christos 1 1 ; issue done 1398 1.1 christos () ; state 1399 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1400 1.1 christos ((GRk INT -1) (ICCi_1 INT -1)) ; outputs 1401 1.1 christos () ; profile action (default) 1402 1.1 christos ) 1403 1.1 christos ; Branch unit 1404 1.1 christos (unit u-branch "Branch Unit" () 1405 1.1 christos 1 1 ; issue done 1406 1.1 christos () ; state 1407 1.1 christos ((GRi INT -1) (GRj INT -1) 1408 1.1 christos (ICCi_2 INT -1) (FCCi_2 INT -1)) ; inputs 1409 1.1 christos ((pc)) ; outputs 1410 1.1 christos () ; profile action (default) 1411 1.1 christos ) 1412 1.1 christos ; Trap unit 1413 1.1 christos (unit u-trap "Trap Unit" () 1414 1.1 christos 1 1 ; issue done 1415 1.1 christos () ; state 1416 1.1 christos ((GRi INT -1) (GRj INT -1) 1417 1.1 christos (ICCi_2 INT -1) (FCCi_2 INT -1)) ; inputs 1418 1.1 christos () ; outputs 1419 1.1 christos () ; profile action (default) 1420 1.1 christos ) 1421 1.1 christos ; Condition code check unit 1422 1.1 christos (unit u-check "Check Unit" () 1423 1.1 christos 1 1 ; issue done 1424 1.1 christos () ; state 1425 1.1 christos ((ICCi_3 INT -1) (FCCi_3 INT -1)) ; inputs 1426 1.1 christos () ; outputs 1427 1.1 christos () ; profile action (default) 1428 1.1 christos ) 1429 1.1 christos ; GR set half unit 1430 1.1 christos (unit u-set-hilo "GR Set Half" () 1431 1.1 christos 1 1 ; issue done 1432 1.1 christos () ; state 1433 1.1 christos () ; inputs 1434 1.1 christos ((GRkhi INT -1) (GRklo INT -1)) ; outputs 1435 1.1 christos () ; profile action (default) 1436 1.1 christos ) 1437 1.1 christos ; GR load unit -- TODO doesn't handle quad 1438 1.1 christos (unit u-gr-load "GR Load Unit" () 1439 1.1 christos 1 1 ; issue done 1440 1.1 christos () ; state 1441 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1442 1.1 christos ((GRk INT -1) (GRdoublek INT -1)) ; outputs 1443 1.1 christos () ; profile action (default) 1444 1.1 christos ) 1445 1.1 christos ; GR store unit -- TODO doesn't handle quad 1446 1.1 christos (unit u-gr-store "GR Store Unit" () 1447 1.1 christos 1 1 ; issue done 1448 1.1 christos () ; state 1449 1.1 christos ((GRi INT -1) (GRj INT -1) (GRk INT -1) (GRdoublek INT -1)) ; inputs 1450 1.1 christos () ; outputs 1451 1.1 christos () ; profile action (default) 1452 1.1 christos ) 1453 1.1 christos ; FR load unit -- TODO doesn't handle quad 1454 1.1 christos (unit u-fr-load "FR Load Unit" () 1455 1.1 christos 1 1 ; issue done 1456 1.1 christos () ; state 1457 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1458 1.1 christos ((FRintk INT -1) (FRdoublek INT -1)) ; outputs 1459 1.1 christos () ; profile action (default) 1460 1.1 christos ) 1461 1.1 christos ; FR store unit -- TODO doesn't handle quad 1462 1.1 christos (unit u-fr-store "FR Store Unit" () 1463 1.1 christos 1 1 ; issue done 1464 1.1 christos () ; state 1465 1.1 christos ((GRi INT -1) (GRj INT -1) (FRintk INT -1) (FRdoublek INT -1)) ; inputs 1466 1.1 christos () ; outputs 1467 1.1 christos () ; profile action (default) 1468 1.1 christos ) 1469 1.1 christos ; Swap unit 1470 1.1 christos (unit u-swap "Swap Unit" () 1471 1.1 christos 1 1 ; issue done 1472 1.1 christos () ; state 1473 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1474 1.1 christos ((GRk INT -1)) ; outputs 1475 1.1 christos () ; profile action (default) 1476 1.1 christos ) 1477 1.1 christos ; FR Move to GR unit 1478 1.1 christos (unit u-fr2gr "FR Move to GR Unit" () 1479 1.1 christos 1 1 ; issue done 1480 1.1 christos () ; state 1481 1.1 christos ((FRintk INT -1)) ; inputs 1482 1.1 christos ((GRj INT -1)) ; outputs 1483 1.1 christos () ; profile action (default) 1484 1.1 christos ) 1485 1.1 christos ; SPR Move to GR unit 1486 1.1 christos (unit u-spr2gr "SPR Move to GR Unit" () 1487 1.1 christos 1 1 ; issue done 1488 1.1 christos () ; state 1489 1.1 christos ((spr INT -1)) ; inputs 1490 1.1 christos ((GRj INT -1)) ; outputs 1491 1.1 christos () ; profile action (default) 1492 1.1 christos ) 1493 1.1 christos ; GR Move to FR unit 1494 1.1 christos (unit u-gr2fr "GR Move to FR Unit" () 1495 1.1 christos 1 1 ; issue done 1496 1.1 christos () ; state 1497 1.1 christos ((GRj INT -1)) ; inputs 1498 1.1 christos ((FRintk INT -1)) ; outputs 1499 1.1 christos () ; profile action (default) 1500 1.1 christos ) 1501 1.1 christos ; GR Move to SPR unit 1502 1.1 christos (unit u-gr2spr "GR Move to SPR Unit" () 1503 1.1 christos 1 1 ; issue done 1504 1.1 christos () ; state 1505 1.1 christos ((GRj INT -1)) ; inputs 1506 1.1 christos ((spr INT -1)) ; outputs 1507 1.1 christos () ; profile action (default) 1508 1.1 christos ) 1509 1.1 christos ; Media unit M1 -- see table 14-8 in the fr450 LSI 1510 1.1 christos (unit u-media-1 "Media-1 unit" () 1511 1.1 christos 1 1 ; issue done 1512 1.1 christos () ; state 1513 1.1 christos ((FRinti INT -1) (FRintj INT -1)) ; inputs 1514 1.1 christos ((FRintk INT -1)) ; outputs 1515 1.1 christos () ; profile action (default) 1516 1.1 christos ) 1517 1.1 christos (unit u-media-1-quad "Media-1-quad unit" () 1518 1.1 christos 1 1 ; issue done 1519 1.1 christos () ; state 1520 1.1 christos ((FRinti INT -1) (FRintj INT -1)) ; inputs 1521 1.1 christos ((FRintk INT -1)) ; outputs 1522 1.1 christos () ; profile action (default) 1523 1.1 christos ) 1524 1.1 christos (unit u-media-hilo "Media-hilo unit -- a variation of the Media-1 unit" () 1525 1.1 christos 1 1 ; issue done 1526 1.1 christos () ; state 1527 1.1 christos () ; inputs 1528 1.1 christos ((FRkhi INT -1) (FRklo INT -1)) ; outputs 1529 1.1 christos () ; profile action (default) 1530 1.1 christos ) 1531 1.1 christos ; Media unit M2 -- see table 14-8 in the fr450 LSI 1532 1.1 christos (unit u-media-2 "Media-2 unit" () 1533 1.1 christos 1 1 ; issue done 1534 1.1 christos () ; state 1535 1.1 christos ((FRinti INT -1) (FRintj INT -1)) ; inputs 1536 1.1 christos ((ACC40Sk INT -1) (ACC40Uk INT -1)) ; outputs 1537 1.1 christos () ; profile action (default) 1538 1.1 christos ) 1539 1.1 christos (unit u-media-2-quad "Media-2-quad unit" () 1540 1.1 christos 1 1 ; issue done 1541 1.1 christos () ; state 1542 1.1 christos ((FRinti INT -1) (FRintj INT -1)) ; inputs 1543 1.1 christos ((ACC40Sk INT -1) (ACC40Uk INT -1)) ; outputs 1544 1.1 christos () ; profile action (default) 1545 1.1 christos ) 1546 1.1 christos (unit u-media-2-acc "Media-2-acc unit" () 1547 1.1 christos 1 1 ; issue done 1548 1.1 christos () ; state 1549 1.1 christos ((ACC40Si INT -1)) ; inputs 1550 1.1 christos ((ACC40Sk INT -1)) ; outputs 1551 1.1 christos () ; profile action (default) 1552 1.1 christos ) 1553 1.1 christos (unit u-media-2-acc-dual "Media-2-acc-dual unit" () 1554 1.1 christos 1 1 ; issue done 1555 1.1 christos () ; state 1556 1.1 christos ((ACC40Si INT -1)) ; inputs 1557 1.1 christos ((ACC40Sk INT -1)) ; outputs 1558 1.1 christos () ; profile action (default) 1559 1.1 christos ) 1560 1.1 christos (unit u-media-2-add-sub "Media-2-add-sub unit" () 1561 1.1 christos 1 1 ; issue done 1562 1.1 christos () ; state 1563 1.1 christos ((ACC40Si INT -1)) ; inputs 1564 1.1 christos ((ACC40Sk INT -1)) ; outputs 1565 1.1 christos () ; profile action (default) 1566 1.1 christos ) 1567 1.1 christos (unit u-media-2-add-sub-dual "Media-2-add-sub-dual unit" () 1568 1.1 christos 1 1 ; issue done 1569 1.1 christos () ; state 1570 1.1 christos ((ACC40Si INT -1)) ; inputs 1571 1.1 christos ((ACC40Sk INT -1)) ; outputs 1572 1.1 christos () ; profile action (default) 1573 1.1 christos ) 1574 1.1 christos ; Media unit M3 -- see table 14-8 in the fr450 LSI 1575 1.1 christos (unit u-media-3 "Media-3 unit" () 1576 1.1 christos 1 1 ; issue done 1577 1.1 christos () ; state 1578 1.1 christos ((FRinti INT -1) (FRintj INT -1)) ; inputs 1579 1.1 christos ((FRintk INT -1)) ; outputs 1580 1.1 christos () ; profile action (default) 1581 1.1 christos ) 1582 1.1 christos (unit u-media-3-dual "Media-3-dual unit" () 1583 1.1 christos 1 1 ; issue done 1584 1.1 christos () ; state 1585 1.1 christos ((FRinti INT -1)) ; inputs 1586 1.1 christos ((FRintk INT -1)) ; outputs 1587 1.1 christos () ; profile action (default) 1588 1.1 christos ) 1589 1.1 christos (unit u-media-3-quad "Media-3-quad unit" () 1590 1.1 christos 1 1 ; issue done 1591 1.1 christos () ; state 1592 1.1 christos ((FRinti INT -1) (FRintj INT -1)) ; inputs 1593 1.1 christos ((FRintk INT -1)) ; outputs 1594 1.1 christos () ; profile action (default) 1595 1.1 christos ) 1596 1.1 christos ; Media unit M4 -- see table 14-8 in the fr450 LSI 1597 1.1 christos (unit u-media-4 "Media-4 unit" () 1598 1.1 christos 1 1 ; issue done 1599 1.1 christos () ; state 1600 1.1 christos ((ACC40Si INT -1) (FRintj INT -1)) ; inputs 1601 1.1 christos ((ACC40Sk INT -1) (FRintk INT -1)) ; outputs 1602 1.1 christos () ; profile action (default) 1603 1.1 christos ) 1604 1.1 christos (unit u-media-4-accg "Media-4-accg unit" () 1605 1.1 christos 1 1 ; issue done 1606 1.1 christos () ; state 1607 1.1 christos ((ACCGi INT -1) (FRinti INT -1)) ; inputs 1608 1.1 christos ((ACCGk INT -1) (FRintk INT -1)) ; outputs 1609 1.1 christos () ; profile action (default) 1610 1.1 christos ) 1611 1.1 christos (unit u-media-4-acc-dual "Media-4-acc-dual unit" () 1612 1.1 christos 1 1 ; issue done 1613 1.1 christos () ; state 1614 1.1 christos ((ACC40Si INT -1)) ; inputs 1615 1.1 christos ((FRintk INT -1)) ; outputs 1616 1.1 christos () ; profile action (default) 1617 1.1 christos ) 1618 1.1 christos (unit u-media-4-mclracca "Media-4 unit for MCLRACC with #A=1" () 1619 1.1 christos 1 1 ; issue done 1620 1.1 christos () ; state 1621 1.1 christos () ; inputs 1622 1.1 christos () ; outputs 1623 1.1 christos () ; profile action (default) 1624 1.1 christos ) 1625 1.1 christos ; Media unit M6 -- see table 14-8 in the fr450 LSI 1626 1.1 christos (unit u-media-6 "Media-6 unit" () 1627 1.1 christos 1 1 ; issue done 1628 1.1 christos () ; state 1629 1.1 christos ((FRinti INT -1)) ; inputs 1630 1.1 christos ((FRintk INT -1)) ; outputs 1631 1.1 christos () ; profile action (default) 1632 1.1 christos ) 1633 1.1 christos ; Media unit M7 -- see table 14-8 in the fr450 LSI 1634 1.1 christos (unit u-media-7 "Media-1 unit" () 1635 1.1 christos 1 1 ; issue done 1636 1.1 christos () ; state 1637 1.1 christos ((FRinti INT -1) (FRintj INT -1)) ; inputs 1638 1.1 christos ((FCCk INT -1)) ; outputs 1639 1.1 christos () ; profile action (default) 1640 1.1 christos ) 1641 1.1 christos ; Media Dual Expand unit 1642 1.1 christos (unit u-media-dual-expand "Media Dual Expand unit" () 1643 1.1 christos 1 1 ; issue done 1644 1.1 christos () ; state 1645 1.1 christos ((FRinti INT -1)) ; inputs 1646 1.1 christos ((FRintk INT -1)) ; outputs 1647 1.1 christos () ; profile action (default) 1648 1.1 christos ) 1649 1.1 christos ; Media Dual half to byte unit 1650 1.1 christos (unit u-media-dual-htob "Media Half to byte" () 1651 1.1 christos 1 1 ; issue done 1652 1.1 christos () ; state 1653 1.1 christos ((FRintj INT -1)) ; inputs 1654 1.1 christos ((FRintk INT -1)) ; outputs 1655 1.1 christos () ; profile action (default) 1656 1.1 christos ) 1657 1.1 christos ; Barrier unit 1658 1.1 christos (unit u-barrier "Barrier unit" () 1659 1.1 christos 1 1 ; issue done 1660 1.1 christos () ; state 1661 1.1 christos () ; inputs 1662 1.1 christos () ; outputs 1663 1.1 christos () ; profile action (default) 1664 1.1 christos ) 1665 1.1 christos ; Memory Barrier unit 1666 1.1 christos (unit u-membar "Memory Barrier unit" () 1667 1.1 christos 1 1 ; issue done 1668 1.1 christos () ; state 1669 1.1 christos () ; inputs 1670 1.1 christos () ; outputs 1671 1.1 christos () ; profile action (default) 1672 1.1 christos ) 1673 1.1 christos ; Insn cache invalidate unit 1674 1.1 christos (unit u-ici "Insn cache invalidate unit" () 1675 1.1 christos 1 1 ; issue done 1676 1.1 christos () ; state 1677 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1678 1.1 christos () ; outputs 1679 1.1 christos () ; profile action (default) 1680 1.1 christos ) 1681 1.1 christos ; Data cache invalidate unit 1682 1.1 christos (unit u-dci "Data cache invalidate unit" () 1683 1.1 christos 1 1 ; issue done 1684 1.1 christos () ; state 1685 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1686 1.1 christos () ; outputs 1687 1.1 christos () ; profile action (default) 1688 1.1 christos ) 1689 1.1 christos ; Data cache flush unit 1690 1.1 christos (unit u-dcf "Data cache flush unit" () 1691 1.1 christos 1 1 ; issue done 1692 1.1 christos () ; state 1693 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1694 1.1 christos () ; outputs 1695 1.1 christos () ; profile action (default) 1696 1.1 christos ) 1697 1.1 christos ; Insn cache preload unit 1698 1.1 christos (unit u-icpl "Insn cache preload unit" () 1699 1.1 christos 1 1 ; issue done 1700 1.1 christos () ; state 1701 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1702 1.1 christos () ; outputs 1703 1.1 christos () ; profile action (default) 1704 1.1 christos ) 1705 1.1 christos ; Data cache preload unit 1706 1.1 christos (unit u-dcpl "Data cache preload unit" () 1707 1.1 christos 1 1 ; issue done 1708 1.1 christos () ; state 1709 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1710 1.1 christos () ; outputs 1711 1.1 christos () ; profile action (default) 1712 1.1 christos ) 1713 1.1 christos ; Insn cache unlock unit 1714 1.1 christos (unit u-icul "Insn cache unlock unit" () 1715 1.1 christos 1 1 ; issue done 1716 1.1 christos () ; state 1717 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1718 1.1 christos () ; outputs 1719 1.1 christos () ; profile action (default) 1720 1.1 christos ) 1721 1.1 christos ; Data cache unlock unit 1722 1.1 christos (unit u-dcul "Data cache unlock unit" () 1723 1.1 christos 1 1 ; issue done 1724 1.1 christos () ; state 1725 1.1 christos ((GRi INT -1) (GRj INT -1)) ; inputs 1726 1.1 christos () ; outputs 1727 1.1 christos () ; profile action (default) 1728 1.1 christos ) 1729 1.1 christos ) 1730 1.1 christos 1732 1.1 christos ; Simple machine - single issue integer machine 1733 1.1 christos (define-mach 1734 1.1 christos (name simple) 1735 1.1 christos (comment "Simple single issue integer cpu") 1736 1.1 christos (cpu frvbf) 1737 1.1 christos ) 1738 1.1 christos (define-model 1739 1.1 christos (name simple) (comment "Simple model") (attrs) 1740 1.1 christos (mach simple) 1741 1.1 christos (pipeline all "" () ((fetch) (decode) (execute) (writeback))) 1742 1.1 christos ; `state' is a list of variables for recording model state 1743 1.1 christos (state) 1744 1.1 christos (unit u-exec "Execution Unit" () 1745 1.1 christos 1 1 ; issue done 1746 1.1 christos () ; state 1747 1.1 christos () ; inputs 1748 1.1 christos () ; outputs 1749 1.1 christos () ; profile action (default) 1750 1.1 christos ) 1751 1.1 christos ) 1752 1.1 christos 1754 1.1 christos ; The instruction fetch/execute cycle. 1755 1.1 christos ; 1756 1.1 christos ; This is how to fetch and decode an instruction. 1757 1.1 christos ; Leave it out for now 1758 1.1 christos 1759 1.1 christos ; (define-extract (const SI 0)) 1760 1.1 christos 1761 1.1 christos ; This is how to execute a decoded instruction. 1762 1.1 christos ; Leave it out for now 1763 1.1 christos 1764 1.1 christos ; (define-execute (const SI 0)) 1765 1.1 christos 1767 1.1 christos ; An attribute to describe which unit an insn runs in. 1768 1.1 christos (define-attr 1769 1.1 christos (for insn) 1770 1.1 christos (type enum) 1771 1.1 christos (name UNIT) 1772 1.1 christos (comment "parallel execution pipeline selection") 1773 1.1 christos ; The order of declaration is significant. 1774 1.1 christos ; See the *_unit_mapping tables in frv.opc 1775 1.1 christos ; Keep variations on the same unit together. 1776 1.1 christos ; Keep the '01' variant immediately after the '1' variant in each unit. 1777 1.1 christos ; Keep the 'ALL' variations immediately after the last numbered variant in each unit. 1778 1.1 christos (values NIL 1779 1.1 christos I0 I1 I01 I2 I3 IALL 1780 1.1 christos FM0 FM1 FM01 FM2 FM3 FMALL FMLOW 1781 1.1 christos B0 B1 B01 1782 1.1 christos C 1783 1.1 christos MULT-DIV ; multiply/division slotted differently on different machines 1784 1.1 christos IACC ; iacc multiply slotted differently on different machines 1785 1.1 christos LOAD ; loads slotted differently on different machines 1786 1.1 christos STORE ; store slotted differently on different machines 1787 1.1 christos SCAN ; scan, scani slotted differently on different machines 1788 1.1 christos DCPL ; dcpl slotted differently on different machines 1789 1.1 christos MDUALACC ; media dual acc slotted differently on different machines 1790 1.1 christos MDCUTSSI ; mdcutssi insn slotted differently on different machines 1791 1.1 christos MCLRACC-1; mclracc A==1 slotted differently on different machines 1792 1.1 christos NUM_UNITS 1793 1.1 christos ) 1794 1.1 christos ) 1795 1.1 christos ; Attributes to describe major categories of insns 1796 1.1 christos (define-attr 1797 1.1 christos (for insn) 1798 1.1 christos (type enum) 1799 1.1 christos (name FR400-MAJOR) 1800 1.1 christos (comment "fr400 major insn categories") 1801 1.1 christos ; The order of declaration is significant. Keep variations on the same major 1802 1.1 christos ; together. 1803 1.1 christos (values NONE 1804 1.1 christos I-1 I-2 I-3 I-4 I-5 1805 1.1 christos B-1 B-2 B-3 B-4 B-5 B-6 1806 1.1 christos C-1 C-2 1807 1.1 christos M-1 M-2 1808 1.1 christos ) 1809 1.1 christos ) 1810 1.1 christos (define-attr 1811 1.1 christos (for insn) 1812 1.1 christos (type enum) 1813 1.1 christos (name FR450-MAJOR) 1814 1.1 christos (comment "fr450 major insn categories") 1815 1.1 christos ; The order of declaration is significant. Keep variations on the same major 1816 1.1 christos ; together. 1817 1.1 christos (values NONE 1818 1.1 christos I-1 I-2 I-3 I-4 I-5 1819 1.1 christos B-1 B-2 B-3 B-4 B-5 B-6 1820 1.1 christos C-1 C-2 1821 1.1 christos M-1 M-2 M-3 M-4 M-5 M-6 1822 1.1 christos ) 1823 1.1 christos ) 1824 1.1 christos (define-attr 1825 1.1 christos (for insn) 1826 1.1 christos (type enum) 1827 1.1 christos (name FR500-MAJOR) 1828 1.1 christos (comment "fr500 major insn categories") 1829 1.1 christos ; The order of declaration is significant. Keep variations on the same major 1830 1.1 christos ; together. 1831 1.1 christos (values NONE 1832 1.1 christos I-1 I-2 I-3 I-4 I-5 I-6 1833 1.1 christos B-1 B-2 B-3 B-4 B-5 B-6 1834 1.1 christos C-1 C-2 1835 1.1 christos F-1 F-2 F-3 F-4 F-5 F-6 F-7 F-8 1836 1.1 christos M-1 M-2 M-3 M-4 M-5 M-6 M-7 M-8 1837 1.1 christos ) 1838 1.1 christos ) 1839 1.1 christos (define-attr 1840 1.1 christos (for insn) 1841 1.1 christos (type enum) 1842 1.1 christos (name FR550-MAJOR) 1843 1.1 christos (comment "fr550 major insn categories") 1844 1.1 christos ; The order of declaration is significant. Keep variations on the same major 1845 1.1 christos ; together. 1846 1.1 christos (values NONE 1847 1.1 christos I-1 I-2 I-3 I-4 I-5 I-6 I-7 I-8 1848 1.1 christos B-1 B-2 B-3 B-4 B-5 B-6 1849 1.1 christos C-1 C-2 1850 1.1 christos F-1 F-2 F-3 F-4 1851 1.1 christos M-1 M-2 M-3 M-4 M-5 1852 1.1 christos ) 1853 1.1 christos ) 1854 1.1 christos ; Privileged insn 1855 1.1 christos (define-attr 1856 1.1 christos (for insn) 1857 1.1 christos (type boolean) 1858 1.1 christos (name PRIVILEGED) 1859 1.1 christos (comment "insn only allowed in supervisor mode") 1860 1.1 christos ) 1861 1.1 christos ; Non-Excepting insn 1862 1.1 christos (define-attr 1863 1.1 christos (for insn) 1864 1.1 christos (type boolean) 1865 1.1 christos (name NON-EXCEPTING) 1866 1.1 christos (comment "non-excepting insn") 1867 1.1 christos ) 1868 1.1 christos ; Conditional insn 1869 1.1 christos (define-attr 1870 1.1 christos (for insn) 1871 1.1 christos (type boolean) 1872 1.1 christos (name CONDITIONAL) 1873 1.1 christos (comment "conditional insn") 1874 1.1 christos ) 1875 1.1 christos ; insn accesses FR registers 1876 1.1 christos (define-attr 1877 1.1 christos (for insn) 1878 1.1 christos (type boolean) 1879 1.1 christos (name FR-ACCESS) 1880 1.1 christos (comment "insn accesses FR registers") 1881 1.1 christos ) 1882 1.1 christos ; insn preserves MSR.OVF 1883 1.1 christos (define-attr 1884 1.1 christos (for insn) 1885 1.1 christos (type boolean) 1886 1.1 christos (name PRESERVE-OVF) 1887 1.1 christos (comment "Preserve value of MSR.OVF") 1888 1.1 christos ) 1889 1.1 christos ; "Audio" instruction provided by the fr405 but not the original fr400 core. 1890 1.1 christos (define-attr 1891 1.1 christos (for insn) 1892 1.1 christos (type boolean) 1893 1.1 christos (name AUDIO) 1894 1.1 christos (comment "Audio instruction added with FR405") 1895 1.1 christos ) 1896 1.1 christos ; null attribute -- used as a place holder for where an attribue is required. 1897 1.1 christos (define-attr 1898 1.1 christos (for insn) 1899 1.1 christos (type boolean) 1900 1.1 christos (name NA) 1901 1.1 christos (comment "placeholder attribute") 1902 1.1 christos (attrs META) ; do not define in any generated file for now 1903 1.1 christos ) 1904 1.1 christos 1905 1.1 christos ; IDOC attribute for instruction documentation. 1906 1.1 christos 1907 1.1 christos (define-attr 1908 1.1 christos (for insn) 1909 1.1 christos (type enum) 1910 1.1 christos (name IDOC) 1911 1.1 christos (comment "insn kind for documentation") 1912 1.1 christos (attrs META) 1913 1.1 christos (values 1914 1.1 christos (MEM - () "Memory") 1915 1.1 christos (ALU - () "ALU") 1916 1.1 christos (FPU - () "FPU") 1917 1.1 christos (BR - () "Branch") 1918 1.1 christos (PRIV - () "Priviledged") 1919 1.1 christos (MISC - () "Miscellaneous") 1920 1.1 christos ) 1921 1.1 christos ) 1922 1.1 christos 1924 1.1 christos ; Instruction fields. 1925 1.1 christos ; 1926 1.1 christos ; Attributes: 1927 1.1 christos ; PCREL-ADDR: pc relative value (for reloc and disassembly purposes) 1928 1.1 christos ; ABS-ADDR: absolute address (for reloc and disassembly purposes?) 1929 1.1 christos ; RESERVED: bits are not used to decode insn, must be all 0 1930 1.1 christos (dnf f-pack "packing bit" () 31 1) 1931 1.1 christos (dnf f-op "primary opcode" () 24 7) 1932 1.1 christos (dnf f-ope1 "extended opcode" () 11 6) 1933 1.1 christos (dnf f-ope2 "extended opcode" () 9 4) 1934 1.1 christos (dnf f-ope3 "extended opcode" () 15 3) 1935 1.1 christos (dnf f-ope4 "extended opcode" () 7 2) 1936 1.1 christos 1937 1.1 christos (dnf f-GRi "source register 1" () 17 6) 1938 1.1 christos (dnf f-GRj "source register 2" () 5 6) 1939 1.1 christos (dnf f-GRk "destination register" () 30 6) 1940 1.1 christos 1941 1.1 christos (dnf f-FRi "source register 1" () 17 6) 1942 1.1 christos (dnf f-FRj "source register 2" () 5 6) 1943 1.1 christos (dnf f-FRk "destination register" () 30 6) 1944 1.1 christos 1945 1.1 christos (dnf f-CPRi "source register 1" () 17 6) 1946 1.1 christos (dnf f-CPRj "source register 2" () 5 6) 1947 1.1 christos (dnf f-CPRk "destination register" () 30 6) 1948 1.1 christos 1949 1.1 christos (dnf f-ACCGi "source register" () 17 6) 1950 1.1 christos (dnf f-ACCGk "destination register" () 30 6) 1951 1.1 christos 1952 1.1 christos (dnf f-ACC40Si "40 bit signed accumulator" () 17 6) 1953 1.1 christos (dnf f-ACC40Ui "40 bit unsigned accumulator" () 17 6) 1954 1.1 christos (dnf f-ACC40Sk "40 bit accumulator" () 30 6) 1955 1.1 christos (dnf f-ACC40Uk "40 bit accumulator" () 30 6) 1956 1.1 christos 1957 1.1 christos (dnf f-CRi "source register" () 14 3) 1958 1.1 christos (dnf f-CRj "source register" () 2 3) 1959 1.1 christos (dnf f-CRk "destination register" () 27 3) 1960 1.1 christos (dnf f-CCi "condition register" () 11 3) 1961 1.1 christos 1962 1.1 christos (df f-CRj_int "target cr for ck insns" () 26 2 UINT 1963 1.1 christos ((value pc) (sub WI value 4)) 1964 1.1 christos ((value pc) (add WI value 4)) 1965 1.1 christos ) 1966 1.1 christos (dnf f-CRj_float "target cr for fck insns" () 26 2) 1967 1.1 christos 1968 1.1 christos (dnf f-ICCi_1 "condition register" () 11 2) 1969 1.1 christos (dnf f-ICCi_2 "condition register" () 26 2) 1970 1.1 christos (dnf f-ICCi_3 "condition register" () 1 2) 1971 1.1 christos (dnf f-FCCi_1 "condition register" () 11 2) 1972 1.1 christos (dnf f-FCCi_2 "condition register" () 26 2) 1973 1.1 christos (dnf f-FCCi_3 "condition register" () 1 2) 1974 1.1 christos (dnf f-FCCk "condition register" () 26 2) 1975 1.1 christos (dnf f-eir "exception insn register" () 17 6) 1976 1.1 christos 1977 1.1 christos (df f-s10 "10 bit sign extended" () 9 10 INT #f #f) 1978 1.1 christos (df f-s12 "12 bit sign extended" () 11 12 INT #f #f) 1979 1.1 christos (df f-d12 "12 bit sign extended" () 11 12 INT #f #f) 1980 1.1 christos (df f-u16 "16 bit unsigned" () 15 16 UINT #f #f) 1981 1.1 christos (df f-s16 "16 bit sign extended" () 15 16 INT #f #f) 1982 1.1 christos (df f-s6 "6 bit signed" () 5 6 INT #f #f) 1983 1.1 christos (df f-s6_1 "6 bit signed" () 11 6 INT #f #f) 1984 1.1 christos (df f-u6 "6 bit unsigned" () 5 6 UINT #f #f) 1985 1.1 christos (df f-s5 "5 bit signed" () 4 5 INT #f #f) 1986 1.1 christos 1987 1.6 christos (df f-u12-h "upper 6 bits of u12" () 17 6 INT #f #f) 1988 1.1 christos (df f-u12-l "lower 6 bits of u12" () 5 6 UINT #f #f) 1989 1.1 christos (dnmf f-u12 "12 bit signed immediate" () INT 1990 1.1 christos (f-u12-h f-u12-l) 1991 1.1 christos (sequence () ; insert 1992 1.1 christos (set (ifield f-u12-h) (sra SI (ifield f-u12) 6)) 1993 1.1 christos (set (ifield f-u12-l) (and (ifield f-u12) #x3f)) 1994 1.1 christos ) 1995 1.1 christos (sequence () ; extract 1996 1.1 christos (set (ifield f-u12) (or (mul (ifield f-u12-h) 64) 1997 1.1 christos (ifield f-u12-l))) 1998 1.1 christos ) 1999 1.1 christos ) 2000 1.1 christos 2001 1.1 christos (dnf f-int-cc "integer branch conditions" () 30 4) 2002 1.1 christos (dnf f-flt-cc "floating branch conditions" () 30 4) 2003 1.1 christos (df f-cond "conditional arithmetic" () 8 1 UINT #f #f) 2004 1.1 christos (df f-ccond "lr branch condition" () 12 1 UINT #f #f) 2005 1.1 christos (df f-hint "2 bit branch prediction hint" () 17 2 UINT #f #f) 2006 1.1 christos (df f-LI "link indicator" () 25 1 UINT #f #f) 2007 1.1 christos (df f-lock "cache lock indicator" () 25 1 UINT #f #f) 2008 1.1 christos (df f-debug "debug mode indicator" () 25 1 UINT #f #f) 2009 1.1 christos (df f-A "all accumulator bit" () 17 1 UINT #f #f) 2010 1.1 christos (df f-ae "cache all entries indicator" () 25 1 UINT #f #f) 2011 1.1 christos 2012 1.1 christos (dnf f-spr-h "upper 6 bits of spr" () 30 6) 2013 1.1 christos (dnf f-spr-l "lower 6 bits of spr" () 17 6) 2014 1.1 christos (dnmf f-spr "special purpose register" () UINT 2015 1.1 christos (f-spr-h f-spr-l) 2016 1.1 christos (sequence () ; insert 2017 1.1 christos (set (ifield f-spr-h) (srl (ifield f-spr) (const 6))) 2018 1.1 christos (set (ifield f-spr-l) (and (ifield f-spr) (const #x3f))) 2019 1.6 christos ) 2020 1.1 christos (sequence () ; extract 2021 1.1 christos (set (ifield f-spr) (or (sll (ifield f-spr-h) (const 6)) 2022 1.1 christos (ifield f-spr-l))) 2023 1.1 christos ) 2024 1.1 christos ) 2025 1.1 christos 2026 1.1 christos (df f-label16 "18 bit pc relative signed offset" (PCREL-ADDR) 15 16 INT 2027 1.1 christos ((value pc) (sra WI (sub WI value pc) (const 2))) 2028 1.1 christos ((value pc) (add WI (mul WI value (const 4)) pc)) 2029 1.1 christos ) 2030 1.1 christos 2031 1.1 christos (df f-labelH6 "upper 6 bits of label24" () 30 6 INT #f #f) 2032 1.1 christos (dnf f-labelL18 "lower 18 bits of label24" () 17 18) 2033 1.1 christos (dnmf f-label24 "26 bit signed offset" (PCREL-ADDR) INT 2034 1.1 christos (f-labelH6 f-labelL18) 2035 1.1 christos ; insert 2036 1.1 christos (sequence () 2037 1.6 christos (set (ifield f-labelH6) 2038 1.1 christos (sra WI (sub (ifield f-label24) pc) (const 20))) 2039 1.6 christos (set (ifield f-labelL18) 2040 1.1 christos (and (srl (sub (ifield f-label24) pc) (const 2)) 2041 1.1 christos (const #x3ffff))) 2042 1.1 christos ) 2043 1.1 christos ; extract 2044 1.1 christos (sequence () 2045 1.1 christos (set (ifield f-label24) 2046 1.1 christos (add (mul (or (mul (ifield f-labelH6) (sll 1 18)) 2047 1.1 christos (ifield f-labelL18)) 2048 1.1 christos (const 4)) 2049 1.1 christos pc))) 2050 1.1 christos ) 2051 1.1 christos 2052 1.1 christos (dnf f-LRAE "Load Real Address E flag" () 5 1) 2053 1.1 christos (dnf f-LRAD "Load Real Address D flag" () 4 1) 2054 1.1 christos (dnf f-LRAS "Load Real Address S flag" () 3 1) 2055 1.1 christos 2056 1.1 christos (dnf f-TLBPRopx "TLB Probe operation number" () 28 3) 2057 1.1 christos (dnf f-TLBPRL "TLB Probe L flag" () 25 1) 2058 1.1 christos 2059 1.1 christos (dnf f-ICCi_1-null "null field" (RESERVED) 11 2) 2060 1.1 christos (dnf f-ICCi_2-null "null field" (RESERVED) 26 2) 2061 1.1 christos (dnf f-ICCi_3-null "null field" (RESERVED) 1 2) 2062 1.1 christos (dnf f-FCCi_1-null "null field" (RESERVED) 11 2) 2063 1.1 christos (dnf f-FCCi_2-null "null field" (RESERVED) 26 2) 2064 1.1 christos (dnf f-FCCi_3-null "null field" (RESERVED) 1 2) 2065 1.1 christos (dnf f-rs-null "null field" (RESERVED) 17 6) 2066 1.1 christos (dnf f-GRi-null "null field" (RESERVED) 17 6) 2067 1.1 christos (dnf f-GRj-null "null field" (RESERVED) 5 6) 2068 1.1 christos (dnf f-GRk-null "null field" (RESERVED) 30 6) 2069 1.1 christos (dnf f-FRi-null "null field" (RESERVED) 17 6) 2070 1.1 christos (dnf f-FRj-null "null field" (RESERVED) 5 6) 2071 1.1 christos (dnf f-ACCj-null "null field" (RESERVED) 5 6) 2072 1.1 christos (dnf f-rd-null "null field" (RESERVED) 30 6) 2073 1.1 christos (dnf f-cond-null "null field" (RESERVED) 30 4) 2074 1.1 christos (dnf f-ccond-null "null field" (RESERVED) 12 1) 2075 1.1 christos (dnf f-s12-null "null field" (RESERVED) 11 12) 2076 1.1 christos (dnf f-label16-null "null field" (RESERVED) 15 16) 2077 1.1 christos (dnf f-misc-null-1 "null field" (RESERVED) 30 5) 2078 1.1 christos (dnf f-misc-null-2 "null field" (RESERVED) 11 6) 2079 1.1 christos (dnf f-misc-null-3 "null field" (RESERVED) 11 4) 2080 1.1 christos (dnf f-misc-null-4 "null field" (RESERVED) 17 2) 2081 1.1 christos (dnf f-misc-null-5 "null field" (RESERVED) 17 16) 2082 1.1 christos (dnf f-misc-null-6 "null field" (RESERVED) 30 3) 2083 1.1 christos (dnf f-misc-null-7 "null field" (RESERVED) 17 3) 2084 1.1 christos (dnf f-misc-null-8 "null field" (RESERVED) 5 3) 2085 1.1 christos (dnf f-misc-null-9 "null field" (RESERVED) 5 4) 2086 1.1 christos (dnf f-misc-null-10 "null field" (RESERVED) 16 5) 2087 1.1 christos (dnf f-misc-null-11 "null field" (RESERVED) 5 1) 2088 1.1 christos 2089 1.1 christos (dnf f-LRA-null "null field" (RESERVED) 2 3) 2090 1.1 christos (dnf f-TLBPR-null "null field" (RESERVED) 30 2) 2091 1.1 christos 2092 1.1 christos (dnf f-LI-off "null field" (RESERVED) 25 1) 2093 1.1 christos (dnf f-LI-on "null field" (RESERVED) 25 1) 2094 1.1 christos 2095 1.1 christos ; Relocation annotations. 2096 1.1 christos (dsh h-reloc-ann "relocation annotation" () (register BI)) 2097 1.1 christos (dnf f-reloc-ann "relocation annotation" () 0 0) 2098 1.1 christos 2099 1.1 christos (define-pmacro (dann xname xcomment xmode xparse xprint) 2100 1.1 christos (define-operand 2101 1.1 christos (name xname) 2102 1.1 christos (comment xcomment) 2103 1.1 christos (type h-reloc-ann) 2104 1.1 christos (index f-reloc-ann) 2105 1.1 christos (mode xmode) 2106 1.1 christos (handlers (parse xparse) (print xprint)) 2107 1.1 christos ) 2108 1.1 christos ) 2109 1.1 christos 2110 1.1 christos 2112 1.1 christos ; Enums. 2113 1.1 christos 2114 1.1 christos ; insn-op: 2115 1.1 christos ; FIXME: should use die macro or some such 2116 1.1 christos (define-normal-insn-enum insn-op "insn op enums" () OP_ f-op 2117 1.1 christos ( 2118 1.1 christos "00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" 2119 1.1 christos "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" 2120 1.1 christos "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2A" "2B" "2C" "2D" "2E" "2F" 2121 1.1 christos "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A" "3B" "3C" "3D" "3E" "3F" 2122 1.1 christos "40" "41" "42" "43" "44" "45" "46" "47" "48" "49" "4A" "4B" "4C" "4D" "4E" "4F" 2123 1.1 christos "50" "51" "52" "53" "54" "55" "56" "57" "58" "59" "5A" "5B" "5C" "5D" "5E" "5F" 2124 1.1 christos "60" "61" "62" "63" "64" "65" "66" "67" "68" "69" "6A" "6B" "6C" "6D" "6E" "6F" 2125 1.1 christos "70" "71" "72" "73" "74" "75" "76" "77" "78" "79" "7A" "7B" "7C" "7D" "7E" "7F" 2126 1.1 christos ) 2127 1.1 christos ) 2128 1.1 christos 2129 1.1 christos (define-normal-insn-enum insn-ope1 "insn ope enums" () OPE1_ f-ope1 2130 1.1 christos ( 2131 1.1 christos "00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" 2132 1.1 christos "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" 2133 1.1 christos "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2A" "2B" "2C" "2D" "2E" "2F" 2134 1.1 christos "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A" "3B" "3C" "3D" "3E" "3F" 2135 1.1 christos ) 2136 1.1 christos ) 2137 1.1 christos 2138 1.1 christos (define-normal-insn-enum insn-ope2 "insn ope enums" () OPE2_ f-ope2 2139 1.1 christos ( 2140 1.1 christos "00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" 2141 1.1 christos ) 2142 1.1 christos ) 2143 1.1 christos 2144 1.1 christos (define-normal-insn-enum insn-ope3 "insn ope enums" () OPE3_ f-ope3 2145 1.1 christos ( 2146 1.1 christos "00" "01" "02" "03" "04" "05" "06" "07" 2147 1.1 christos ) 2148 1.1 christos ) 2149 1.1 christos 2150 1.1 christos (define-normal-insn-enum insn-ope4 "insn ope enums" () OPE4_ f-ope4 2151 1.1 christos ( 2152 1.1 christos "0" "1" "2" "3" 2153 1.1 christos ) 2154 1.1 christos ) 2155 1.1 christos 2156 1.1 christos ; int-cc: integer branch conditions 2157 1.1 christos ; FIXME: should use die macro or some such 2158 1.1 christos (define-normal-insn-enum int-cc "integer branch cond enums" () ICC_ f-int-cc 2159 1.1 christos ( 2160 1.1 christos "nev" "c" "v" "lt" "eq" "ls" "n" "le" 2161 1.1 christos "ra" "nc" "nv" "ge" "ne" "hi" "p" "gt" 2162 1.1 christos ) 2163 1.1 christos ) 2164 1.1 christos 2165 1.1 christos ; flt-cc: floating-point/media branch conditions 2166 1.1 christos ; FIXME: should use die macro or some such 2167 1.1 christos (define-normal-insn-enum flt-cc "float branch cond enums" () FCC_ f-flt-cc 2168 1.1 christos ("nev" "u" "gt" "ug" "lt" "ul" "lg" "ne" 2169 1.1 christos "eq" "ue" "ge" "uge" "le" "ule" "o" "ra") 2170 1.1 christos ) 2171 1.1 christos 2173 1.1 christos ; Hardware pieces. 2174 1.1 christos ; These entries list the elements of the raw hardware. 2175 1.1 christos ; They're also used to provide tables and other elements of the assembly 2176 1.1 christos ; language. 2177 1.1 christos (dnh h-pc "program counter" (PC PROFILE) (pc) () () ()) 2178 1.1 christos 2179 1.1 christos ; The PSR. The individual fields are referenced more than the entire 2180 1.1 christos ; register, so reference them directly. We can assemble the 2181 1.1 christos ; entire register contents when necessary. 2182 1.1 christos ; 2183 1.1 christos (dsh h-psr_imple "PSR.IMPLE" () (register UQI)) 2184 1.1 christos (dsh h-psr_ver "PSR.VER" () (register UQI)) 2185 1.1 christos (dsh h-psr_ice "PSR.ICE bit" () (register BI)) 2186 1.1 christos (dsh h-psr_nem "PSR.NEM bit" () (register BI)) 2187 1.1 christos (dsh h-psr_cm "PSR.CM bit" () (register BI)) 2188 1.1 christos (dsh h-psr_be "PSR.BE bit" () (register BI)) 2189 1.1 christos (dsh h-psr_esr "PSR.ESR bit" () (register BI)) 2190 1.1 christos (dsh h-psr_ef "PSR.EF bit" () (register BI)) 2191 1.1 christos (dsh h-psr_em "PSR.EM bit" () (register BI)) 2192 1.1 christos (dsh h-psr_pil "PSR.PIL " () (register UQI)) 2193 1.1 christos (dsh h-psr_ps "PSR.PS bit" () (register BI)) 2194 1.1 christos (dsh h-psr_et "PSR.ET bit" () (register BI)) 2195 1.1 christos 2196 1.1 christos ; PSR.S requires special handling because the shadow registers (SR0-SR4) must 2197 1.1 christos ; be switched with GR4-GR7 when changing from user to supervisor mode or 2198 1.1 christos ; vice-versa. 2199 1.1 christos (define-hardware 2200 1.1 christos (name h-psr_s) 2201 1.1 christos (comment "PSR.S bit") 2202 1.1 christos (attrs) 2203 1.1 christos (type register BI) 2204 1.1 christos (get) 2205 1.1 christos (set (newval) (c-call VOID "@cpu@_h_psr_s_set_handler" newval)) 2206 1.1 christos ) 2207 1.1 christos 2208 1.1 christos ; The TBR. The individual bits are referenced more than the entire 2209 1.1 christos ; register, so reference them directly. We can assemble the 2210 1.1 christos ; entire register contents when necessary. 2211 1.1 christos ; 2212 1.1 christos (dsh h-tbr_tba "TBR.TBA" () (register UWI)) 2213 1.1 christos (dsh h-tbr_tt "TBR.TT" () (register UQI)) 2214 1.1 christos 2215 1.1 christos ; The BPSR. The individual bits are referenced more than the entire 2216 1.1 christos ; register, so reference them directly. We can assemble the 2217 1.1 christos ; entire register contents when necessary. 2218 1.1 christos ; 2219 1.1 christos (dsh h-bpsr_bs "PSR.S bit" () (register BI)) 2220 1.1 christos (dsh h-bpsr_bet "PSR.ET bit" () (register BI)) 2221 1.1 christos 2222 1.1 christos ; General registers 2223 1.1 christos ; 2224 1.1 christos (define-keyword 2225 1.1 christos (name gr-names) 2226 1.1 christos (print-name h-gr) 2227 1.1 christos (prefix "") 2228 1.1 christos (values 2229 1.1 christos (sp 1) (fp 2) 2230 1.1 christos (gr0 0)(gr1 1)(gr2 2)(gr3 3)(gr4 4)(gr5 5)(gr6 6)(gr7 7) 2231 1.1 christos (gr8 8)(gr9 9)(gr10 10)(gr11 11)(gr12 12)(gr13 13)(gr14 14)(gr15 15) 2232 1.1 christos (gr16 16)(gr17 17)(gr18 18)(gr19 19)(gr20 20)(gr21 21)(gr22 22)(gr23 23) 2233 1.1 christos (gr24 24)(gr25 25)(gr26 26)(gr27 27)(gr28 28)(gr29 29)(gr30 30)(gr31 31) 2234 1.1 christos (gr32 32)(gr33 33)(gr34 34)(gr35 35)(gr36 36)(gr37 37)(gr38 38)(gr39 39) 2235 1.1 christos (gr40 40)(gr41 41)(gr42 42)(gr43 43)(gr44 44)(gr45 45)(gr46 46)(gr47 47) 2236 1.1 christos (gr48 48)(gr49 49)(gr50 50)(gr51 51)(gr52 52)(gr53 53)(gr54 54)(gr55 55) 2237 1.1 christos (gr56 56)(gr57 57)(gr58 58)(gr59 59)(gr60 60)(gr61 61)(gr62 62)(gr63 63) 2238 1.1 christos ) 2239 1.1 christos ) 2240 1.1 christos 2241 1.1 christos (define-hardware 2242 1.1 christos (name h-gr) 2243 1.1 christos (comment "general registers") 2244 1.1 christos (attrs PROFILE) 2245 1.1 christos (type register USI (64)) 2246 1.1 christos (indices extern-keyword gr-names) 2247 1.1 christos (get (index) (c-call WI "@cpu@_h_gr_get_handler" index)) 2248 1.1 christos (set (index newval) (c-call VOID "@cpu@_h_gr_set_handler" index newval)) 2249 1.1 christos ) 2250 1.1 christos 2251 1.1 christos ; General Registers as double words 2252 1.1 christos ; These registers are shadowed onto h-gr 2253 1.1 christos (define-hardware 2254 1.1 christos (name h-gr_double) 2255 1.1 christos (comment "general registers as double words") 2256 1.1 christos (attrs PROFILE VIRTUAL) 2257 1.1 christos (type register DI (32)) 2258 1.1 christos ; FIXME: Need constraint to prohibit odd numbers. 2259 1.1 christos (indices extern-keyword gr-names) 2260 1.1 christos (get (index) 2261 1.1 christos (c-call DI "@cpu@_h_gr_double_get_handler" index)) 2262 1.1 christos (set (index newval) 2263 1.1 christos (c-call VOID "@cpu@_h_gr_double_set_handler" index newval)) 2264 1.1 christos ) 2265 1.1 christos 2266 1.1 christos ; General Registers as high and low half words 2267 1.1 christos ; These registers are shadowed onto h-gr 2268 1.1 christos (define-hardware 2269 1.1 christos (name h-gr_hi) 2270 1.1 christos (comment "general registers as high half word") 2271 1.1 christos (attrs PROFILE VIRTUAL) 2272 1.1 christos (type register UHI (64)) 2273 1.1 christos (indices extern-keyword gr-names) 2274 1.1 christos (get (index) (c-call UHI "@cpu@_h_gr_hi_get_handler" index)) 2275 1.1 christos (set (index newval) (c-call VOID "@cpu@_h_gr_hi_set_handler" index newval)) 2276 1.1 christos ) 2277 1.1 christos (define-hardware 2278 1.1 christos (name h-gr_lo) 2279 1.1 christos (comment "general registers as low half word") 2280 1.1 christos (attrs PROFILE VIRTUAL) 2281 1.1 christos (type register UHI (64)) 2282 1.1 christos (indices extern-keyword gr-names) 2283 1.1 christos (get (index) (c-call UHI "@cpu@_h_gr_lo_get_handler" index)) 2284 1.1 christos (set (index newval) (c-call VOID "@cpu@_h_gr_lo_set_handler" index newval)) 2285 1.1 christos ) 2286 1.1 christos 2287 1.1 christos ; Floating Point Registers 2288 1.1 christos (define-keyword 2289 1.1 christos (name fr-names) 2290 1.1 christos (print-name h-fr) 2291 1.1 christos (prefix "") 2292 1.1 christos (values 2293 1.1 christos (fr0 0)(fr1 1)(fr2 2)(fr3 3)(fr4 4)(fr5 5)(fr6 6)(fr7 7) 2294 1.1 christos (fr8 8)(fr9 9)(fr10 10)(fr11 11)(fr12 12)(fr13 13)(fr14 14)(fr15 15) 2295 1.1 christos (fr16 16)(fr17 17)(fr18 18)(fr19 19)(fr20 20)(fr21 21)(fr22 22)(fr23 23) 2296 1.1 christos (fr24 24)(fr25 25)(fr26 26)(fr27 27)(fr28 28)(fr29 29)(fr30 30)(fr31 31) 2297 1.1 christos (fr32 32)(fr33 33)(fr34 34)(fr35 35)(fr36 36)(fr37 37)(fr38 38)(fr39 39) 2298 1.1 christos (fr40 40)(fr41 41)(fr42 42)(fr43 43)(fr44 44)(fr45 45)(fr46 46)(fr47 47) 2299 1.1 christos (fr48 48)(fr49 49)(fr50 50)(fr51 51)(fr52 52)(fr53 53)(fr54 54)(fr55 55) 2300 1.1 christos (fr56 56)(fr57 57)(fr58 58)(fr59 59)(fr60 60)(fr61 61)(fr62 62)(fr63 63) 2301 1.1 christos ) 2302 1.1 christos ) 2303 1.1 christos 2304 1.1 christos (define-hardware 2305 1.1 christos (name h-fr) 2306 1.1 christos (comment "floating point registers") 2307 1.1 christos (attrs PROFILE) 2308 1.1 christos (type register SF (64)) 2309 1.1 christos (indices extern-keyword fr-names) 2310 1.1 christos (get (index) (c-call SF "@cpu@_h_fr_get_handler" index)) 2311 1.1 christos (set (index newval) (c-call VOID "@cpu@_h_fr_set_handler" index newval)) 2312 1.1 christos ) 2313 1.1 christos 2314 1.1 christos ; Floating Point Registers as double precision 2315 1.1 christos ; These registers are shadowed onto h-fr 2316 1.1 christos 2317 1.1 christos (define-hardware 2318 1.1 christos (name h-fr_double) 2319 1.1 christos (comment "floating point registers as double precision") 2320 1.1 christos (attrs PROFILE VIRTUAL) 2321 1.1 christos (type register DF (32)) 2322 1.1 christos ; FIXME: Need constraint to prohibit odd numbers. 2323 1.1 christos (indices extern-keyword fr-names) 2324 1.1 christos (get (index) 2325 1.1 christos (c-call DF "@cpu@_h_fr_double_get_handler" index)) 2326 1.1 christos (set (index newval) 2327 1.1 christos (c-call VOID "@cpu@_h_fr_double_set_handler" index newval)) 2328 1.1 christos ) 2329 1.1 christos 2330 1.1 christos ; Floating Point Registers as integer words. 2331 1.1 christos ; These registers are shadowed onto h-fr 2332 1.1 christos 2333 1.1 christos (define-hardware 2334 1.1 christos (name h-fr_int) 2335 1.1 christos (comment "floating point registers as integers") 2336 1.1 christos (attrs PROFILE VIRTUAL) 2337 1.1 christos (type register USI (64)) 2338 1.1 christos (indices extern-keyword fr-names) 2339 1.1 christos (get (index) 2340 1.1 christos (c-call USI "@cpu@_h_fr_int_get_handler" index)) 2341 1.1 christos (set (index newval) 2342 1.1 christos (c-call VOID "@cpu@_h_fr_int_set_handler" index newval)) 2343 1.1 christos ) 2344 1.1 christos 2345 1.1 christos ; Floating Point Registers as high and low half words 2346 1.1 christos ; These registers are shadowed onto h-fr 2347 1.1 christos (define-hardware 2348 1.1 christos (name h-fr_hi) 2349 1.1 christos (comment "floating point registers as unsigned high half word") 2350 1.1 christos (attrs PROFILE VIRTUAL) 2351 1.1 christos (type register UHI (64)) 2352 1.1 christos (indices extern-keyword fr-names) 2353 1.1 christos (get (regno) (srl (reg h-fr_int regno) 16)) 2354 1.1 christos (set (regno newval) (set (reg h-fr_int regno) 2355 1.1 christos (or (and (reg h-fr_int regno) #xffff) 2356 1.1 christos (sll newval 16)))) 2357 1.1 christos ) 2358 1.1 christos (define-hardware 2359 1.1 christos (name h-fr_lo) 2360 1.1 christos (comment "floating point registers as unsigned low half word") 2361 1.1 christos (attrs PROFILE VIRTUAL) 2362 1.1 christos (type register UHI (64)) 2363 1.1 christos (indices extern-keyword fr-names) 2364 1.1 christos (get (regno) (and (reg h-fr_int regno) #xffff)) 2365 1.1 christos (set (regno newval) (set (reg h-fr_int regno) 2366 1.1 christos (or (and (reg h-fr_int regno) #xffff0000) 2367 1.1 christos (and newval #xffff)))) 2368 1.1 christos ) 2369 1.1 christos 2370 1.1 christos ; Floating Point Registers as unsigned bytes 2371 1.1 christos ; These registers are shadowed onto h-fr 2372 1.1 christos (define-hardware 2373 1.1 christos (name h-fr_0) 2374 1.1 christos (comment "floating point registers as unsigned byte 0") 2375 1.1 christos (attrs PROFILE VIRTUAL) 2376 1.1 christos (type register UHI (64)) 2377 1.1 christos (indices extern-keyword fr-names) 2378 1.1 christos (get (regno) (and (reg h-fr_int regno) #xff)) 2379 1.1 christos (set (regno newval) 2380 1.1 christos (sequence () 2381 1.1 christos (if (gt USI newval #xff) 2382 1.1 christos (set newval #xff)) 2383 1.1 christos (set (reg h-fr_int regno) (or (and (reg h-fr_int regno) #xffffff00) 2384 1.1 christos newval)))) 2385 1.1 christos ) 2386 1.1 christos (define-hardware 2387 1.1 christos (name h-fr_1) 2388 1.1 christos (comment "floating point registers as unsigned byte 1") 2389 1.1 christos (attrs PROFILE VIRTUAL) 2390 1.1 christos (type register UHI (64)) 2391 1.1 christos (indices extern-keyword fr-names) 2392 1.1 christos (get (regno) (and (srl (reg h-fr_int regno) 8) #xff)) 2393 1.1 christos (set (regno newval) 2394 1.1 christos (sequence () 2395 1.1 christos (if (gt USI newval #xff) 2396 1.1 christos (set newval #xff)) 2397 1.1 christos (set (reg h-fr_int regno) (or (and (reg h-fr_int regno) #xffff00ff) 2398 1.1 christos (sll newval 8))))) 2399 1.1 christos ) 2400 1.1 christos (define-hardware 2401 1.1 christos (name h-fr_2) 2402 1.1 christos (comment "floating point registers as unsigned byte 2") 2403 1.1 christos (attrs PROFILE VIRTUAL) 2404 1.1 christos (type register UHI (64)) 2405 1.1 christos (indices extern-keyword fr-names) 2406 1.1 christos (get (regno) (and (srl (reg h-fr_int regno) 16) #xff)) 2407 1.1 christos (set (regno newval) 2408 1.1 christos (sequence () 2409 1.1 christos (if (gt USI newval #xff) 2410 1.1 christos (set newval #xff)) 2411 1.1 christos (set (reg h-fr_int regno) (or (and (reg h-fr_int regno) #xff00ffff) 2412 1.1 christos (sll newval 16))))) 2413 1.1 christos ) 2414 1.1 christos (define-hardware 2415 1.1 christos (name h-fr_3) 2416 1.1 christos (comment "floating point registers as unsigned byte 3") 2417 1.1 christos (attrs PROFILE VIRTUAL) 2418 1.1 christos (type register UHI (64)) 2419 1.1 christos (indices extern-keyword fr-names) 2420 1.1 christos (get (regno) (and (srl (reg h-fr_int regno) 24) #xff)) 2421 1.1 christos (set (regno newval) 2422 1.1 christos (sequence () 2423 1.1 christos (if (gt USI newval #xff) 2424 1.1 christos (set newval #xff)) 2425 1.1 christos (set (reg h-fr_int regno) (or (and (reg h-fr_int regno) #x00ffffff) 2426 1.1 christos (sll newval 24))))) 2427 1.1 christos ) 2428 1.1 christos ; Coprocessor Registers 2429 1.1 christos ; 2430 1.1 christos (define-keyword 2431 1.1 christos (name cpr-names) 2432 1.1 christos (print-name h-cpr) 2433 1.1 christos (prefix "") 2434 1.1 christos (values 2435 1.1 christos (cpr0 0)(cpr1 1)(cpr2 2)(cpr3 3)(cpr4 4)(cpr5 5)(cpr6 6)(cpr7 7) 2436 1.1 christos (cpr8 8)(cpr9 9)(cpr10 10)(cpr11 11)(cpr12 12)(cpr13 13)(cpr14 14)(cpr15 15) 2437 1.1 christos (cpr16 16)(cpr17 17)(cpr18 18)(cpr19 19)(cpr20 20)(cpr21 21)(cpr22 22)(cpr23 23) 2438 1.1 christos (cpr24 24)(cpr25 25)(cpr26 26)(cpr27 27)(cpr28 28)(cpr29 29)(cpr30 30)(cpr31 31) 2439 1.1 christos (cpr32 32)(cpr33 33)(cpr34 34)(cpr35 35)(cpr36 36)(cpr37 37)(cpr38 38)(cpr39 39) 2440 1.1 christos (cpr40 40)(cpr41 41)(cpr42 42)(cpr43 43)(cpr44 44)(cpr45 45)(cpr46 46)(cpr47 47) 2441 1.1 christos (cpr48 48)(cpr49 49)(cpr50 50)(cpr51 51)(cpr52 52)(cpr53 53)(cpr54 54)(cpr55 55) 2442 1.1 christos (cpr56 56)(cpr57 57)(cpr58 58)(cpr59 59)(cpr60 60)(cpr61 61)(cpr62 62)(cpr63 63) 2443 1.1 christos ) 2444 1.1 christos ) 2445 1.1 christos 2446 1.1 christos (define-hardware 2447 1.1 christos (name h-cpr) 2448 1.1 christos (comment "coprocessor registers") 2449 1.1 christos (attrs PROFILE (MACH frv)) 2450 1.1 christos (type register WI (64)) 2451 1.1 christos (indices extern-keyword cpr-names) 2452 1.1 christos ) 2453 1.1 christos 2454 1.1 christos ; Coprocessor Registers as double words 2455 1.1 christos ; These registers are shadowed onto h-cpr 2456 1.1 christos (define-hardware 2457 1.1 christos (name h-cpr_double) 2458 1.1 christos (comment "coprocessor registers as double words") 2459 1.1 christos (attrs PROFILE VIRTUAL (MACH frv)) 2460 1.1 christos (type register DI (32)) 2461 1.1 christos ; FIXME: Need constraint to prohibit odd numbers. 2462 1.1 christos (indices extern-keyword cpr-names) 2463 1.1 christos (get (index) 2464 1.1 christos (c-call DI "@cpu@_h_cpr_double_get_handler" index)) 2465 1.1 christos (set (index newval) 2466 1.1 christos (c-call VOID "@cpu@_h_cpr_double_set_handler" index newval)) 2467 1.1 christos ) 2468 1.1 christos 2469 1.1 christos ; Special Purpose Registers 2470 1.1 christos ; 2471 1.1 christos (define-keyword 2472 1.1 christos (name spr-names) 2473 1.1 christos (print-name h-spr) 2474 1.1 christos (prefix "") 2475 1.1 christos (values 2476 1.1 christos (psr 0) (pcsr 1) (bpcsr 2) (tbr 3) (bpsr 4) 2477 1.1 christos 2478 1.1 christos (hsr0 16) (hsr1 17) (hsr2 18) (hsr3 19) 2479 1.1 christos (hsr4 20) (hsr5 21) (hsr6 22) (hsr7 23) 2480 1.1 christos (hsr8 24) (hsr9 25) (hsr10 26) (hsr11 27) 2481 1.1 christos (hsr12 28) (hsr13 29) (hsr14 30) (hsr15 31) 2482 1.1 christos (hsr16 32) (hsr17 33) (hsr18 34) (hsr19 35) 2483 1.1 christos (hsr20 36) (hsr21 37) (hsr22 38) (hsr23 39) 2484 1.1 christos (hsr24 40) (hsr25 41) (hsr26 42) (hsr27 43) 2485 1.1 christos (hsr28 44) (hsr29 45) (hsr30 46) (hsr31 47) 2486 1.1 christos (hsr32 48) (hsr33 49) (hsr34 50) (hsr35 51) 2487 1.1 christos (hsr36 52) (hsr37 53) (hsr38 54) (hsr39 55) 2488 1.1 christos (hsr40 56) (hsr41 57) (hsr42 58) (hsr43 59) 2489 1.1 christos (hsr44 60) (hsr45 61) (hsr46 62) (hsr47 63) 2490 1.1 christos (hsr48 64) (hsr49 65) (hsr50 66) (hsr51 67) 2491 1.1 christos (hsr52 68) (hsr53 69) (hsr54 70) (hsr55 71) 2492 1.1 christos (hsr56 72) (hsr57 73) (hsr58 74) (hsr59 75) 2493 1.1 christos (hsr60 76) (hsr61 77) (hsr62 78) (hsr63 79) 2494 1.1 christos 2495 1.1 christos (ccr 256) (cccr 263) (lr 272) (lcr 273) (iacc0h 280) (iacc0l 281) (isr 288) 2496 1.1 christos 2497 1.1 christos (neear0 352) (neear1 353) (neear2 354) (neear3 355) 2498 1.1 christos (neear4 356) (neear5 357) (neear6 358) (neear7 359) 2499 1.1 christos (neear8 360) (neear9 361) (neear10 362) (neear11 363) 2500 1.1 christos (neear12 364) (neear13 365) (neear14 366) (neear15 367) 2501 1.1 christos (neear16 368) (neear17 369) (neear18 370) (neear19 371) 2502 1.1 christos (neear20 372) (neear21 373) (neear22 374) (neear23 375) 2503 1.1 christos (neear24 376) (neear25 377) (neear26 378) (neear27 379) 2504 1.1 christos (neear28 380) (neear29 381) (neear30 382) (neear31 383) 2505 1.1 christos 2506 1.1 christos (nesr0 384) (nesr1 385) (nesr2 386) (nesr3 387) 2507 1.1 christos (nesr4 388) (nesr5 389) (nesr6 390) (nesr7 391) 2508 1.1 christos (nesr8 392) (nesr9 393) (nesr10 394) (nesr11 395) 2509 1.1 christos (nesr12 396) (nesr13 397) (nesr14 398) (nesr15 399) 2510 1.1 christos (nesr16 400) (nesr17 401) (nesr18 402) (nesr19 403) 2511 1.1 christos (nesr20 404) (nesr21 405) (nesr22 406) (nesr23 407) 2512 1.1 christos (nesr24 408) (nesr25 409) (nesr26 410) (nesr27 411) 2513 1.1 christos (nesr28 412) (nesr29 413) (nesr30 414) (nesr31 415) 2514 1.1 christos 2515 1.1 christos (necr 416) 2516 1.1 christos 2517 1.1 christos (gner0 432) (gner1 433) 2518 1.1 christos 2519 1.1 christos (fner0 434) (fner1 435) 2520 1.1 christos 2521 1.1 christos (epcr0 512) (epcr1 513) (epcr2 514) (epcr3 515) 2522 1.1 christos (epcr4 516) (epcr5 517) (epcr6 518) (epcr7 519) 2523 1.1 christos (epcr8 520) (epcr9 521) (epcr10 522) (epcr11 523) 2524 1.1 christos (epcr12 524) (epcr13 525) (epcr14 526) (epcr15 527) 2525 1.1 christos (epcr16 528) (epcr17 529) (epcr18 530) (epcr19 531) 2526 1.1 christos (epcr20 532) (epcr21 533) (epcr22 534) (epcr23 535) 2527 1.1 christos (epcr24 536) (epcr25 537) (epcr26 538) (epcr27 539) 2528 1.1 christos (epcr28 540) (epcr29 541) (epcr30 542) (epcr31 543) 2529 1.1 christos (epcr32 544) (epcr33 545) (epcr34 546) (epcr35 547) 2530 1.1 christos (epcr36 548) (epcr37 549) (epcr38 550) (epcr39 551) 2531 1.1 christos (epcr40 552) (epcr41 553) (epcr42 554) (epcr43 555) 2532 1.1 christos (epcr44 556) (epcr45 557) (epcr46 558) (epcr47 559) 2533 1.1 christos (epcr48 560) (epcr49 561) (epcr50 562) (epcr51 563) 2534 1.1 christos (epcr52 564) (epcr53 565) (epcr54 566) (epcr55 567) 2535 1.1 christos (epcr56 568) (epcr57 569) (epcr58 570) (epcr59 571) 2536 1.1 christos (epcr60 572) (epcr61 573) (epcr62 574) (epcr63 575) 2537 1.1 christos 2538 1.1 christos (esr0 576) (esr1 577) (esr2 578) (esr3 579) 2539 1.1 christos (esr4 580) (esr5 581) (esr6 582) (esr7 583) 2540 1.1 christos (esr8 584) (esr9 585) (esr10 586) (esr11 587) 2541 1.1 christos (esr12 588) (esr13 589) (esr14 590) (esr15 591) 2542 1.1 christos (esr16 592) (esr17 593) (esr18 594) (esr19 595) 2543 1.1 christos (esr20 596) (esr21 597) (esr22 598) (esr23 599) 2544 1.1 christos (esr24 600) (esr25 601) (esr26 602) (esr27 603) 2545 1.1 christos (esr28 604) (esr29 605) (esr30 606) (esr31 607) 2546 1.1 christos (esr32 608) (esr33 609) (esr34 610) (esr35 611) 2547 1.1 christos (esr36 612) (esr37 613) (esr38 614) (esr39 615) 2548 1.1 christos (esr40 616) (esr41 617) (esr42 618) (esr43 619) 2549 1.1 christos (esr44 620) (esr45 621) (esr46 622) (esr47 623) 2550 1.1 christos (esr48 624) (esr49 625) (esr50 626) (esr51 627) 2551 1.1 christos (esr52 628) (esr53 629) (esr54 630) (esr55 631) 2552 1.1 christos (esr56 632) (esr57 633) (esr58 634) (esr59 635) 2553 1.1 christos (esr60 636) (esr61 637) (esr62 638) (esr63 639) 2554 1.1 christos 2555 1.1 christos (eir0 640) (eir1 641) (eir2 642) (eir3 643) 2556 1.1 christos (eir4 644) (eir5 645) (eir6 646) (eir7 647) 2557 1.1 christos (eir8 648) (eir9 649) (eir10 650) (eir11 651) 2558 1.1 christos (eir12 652) (eir13 653) (eir14 654) (eir15 655) 2559 1.1 christos (eir16 656) (eir17 657) (eir18 658) (eir19 659) 2560 1.1 christos (eir20 660) (eir21 661) (eir22 662) (eir23 663) 2561 1.1 christos (eir24 664) (eir25 665) (eir26 666) (eir27 667) 2562 1.1 christos (eir28 668) (eir29 669) (eir30 670) (eir31 671) 2563 1.1 christos 2564 1.1 christos (esfr0 672) (esfr1 673) 2565 1.1 christos 2566 1.1 christos (sr0 768) (sr1 769) (sr2 770) (sr3 771) 2567 1.1 christos 2568 1.1 christos (scr0 832) (scr1 833) (scr2 834) (scr3 835) 2569 1.1 christos 2570 1.1 christos (fsr0 1024) (fsr1 1025) (fsr2 1026) (fsr3 1027) 2571 1.1 christos (fsr4 1028) (fsr5 1029) (fsr6 1030) (fsr7 1031) 2572 1.1 christos (fsr8 1032) (fsr9 1033) (fsr10 1034) (fsr11 1035) 2573 1.1 christos (fsr12 1036) (fsr13 1037) (fsr14 1038) (fsr15 1039) 2574 1.1 christos (fsr16 1040) (fsr17 1041) (fsr18 1042) (fsr19 1043) 2575 1.1 christos (fsr20 1044) (fsr21 1045) (fsr22 1046) (fsr23 1047) 2576 1.1 christos (fsr24 1048) (fsr25 1049) (fsr26 1050) (fsr27 1051) 2577 1.1 christos (fsr28 1052) (fsr29 1053) (fsr30 1054) (fsr31 1055) 2578 1.1 christos (fsr32 1056) (fsr33 1057) (fsr34 1058) (fsr35 1059) 2579 1.1 christos (fsr36 1060) (fsr37 1061) (fsr38 1062) (fsr39 1063) 2580 1.1 christos (fsr40 1064) (fsr41 1065) (fsr42 1066) (fsr43 1067) 2581 1.1 christos (fsr44 1068) (fsr45 1069) (fsr46 1070) (fsr47 1071) 2582 1.1 christos (fsr48 1072) (fsr49 1073) (fsr50 1074) (fsr51 1075) 2583 1.1 christos (fsr52 1076) (fsr53 1077) (fsr54 1078) (fsr55 1079) 2584 1.1 christos (fsr56 1080) (fsr57 1081) (fsr58 1082) (fsr59 1083) 2585 1.1 christos (fsr60 1084) (fsr61 1085) (fsr62 1086) (fsr63 1087) 2586 1.1 christos 2587 1.1 christos ; FQ0-FQ31 are 64 bit registers. 2588 1.1 christos ; These names allow access to the upper 32 bits of the FQ registers. 2589 1.1 christos (fqop0 1088) (fqop1 1090) (fqop2 1092) (fqop3 1094) 2590 1.1 christos (fqop4 1096) (fqop5 1098) (fqop6 1100) (fqop7 1102) 2591 1.1 christos (fqop8 1104) (fqop9 1106) (fqop10 1108) (fqop11 1110) 2592 1.1 christos (fqop12 1112) (fqop13 1114) (fqop14 1116) (fqop15 1118) 2593 1.1 christos (fqop16 1120) (fqop17 1122) (fqop18 1124) (fqop19 1126) 2594 1.1 christos (fqop20 1128) (fqop21 1130) (fqop22 1132) (fqop23 1134) 2595 1.1 christos (fqop24 1136) (fqop25 1138) (fqop26 1140) (fqop27 1142) 2596 1.1 christos (fqop28 1144) (fqop29 1146) (fqop30 1148) (fqop31 1150) 2597 1.1 christos ; These names allow access to the lower 32 bits of the FQ registers. 2598 1.1 christos (fqst0 1089) (fqst1 1091) (fqst2 1093) (fqst3 1095) 2599 1.1 christos (fqst4 1097) (fqst5 1099) (fqst6 1101) (fqst7 1103) 2600 1.1 christos (fqst8 1105) (fqst9 1107) (fqst10 1109) (fqst11 1111) 2601 1.1 christos (fqst12 1113) (fqst13 1115) (fqst14 1117) (fqst15 1119) 2602 1.1 christos (fqst16 1121) (fqst17 1123) (fqst18 1125) (fqst19 1127) 2603 1.1 christos (fqst20 1129) (fqst21 1131) (fqst22 1133) (fqst23 1135) 2604 1.1 christos (fqst24 1137) (fqst25 1139) (fqst26 1141) (fqst27 1143) 2605 1.1 christos (fqst28 1145) (fqst29 1147) (fqst30 1149) (fqst31 1151) 2606 1.1 christos ; These also access the lower 32 bits of the FQ registers. 2607 1.1 christos ; These are not accessible as spr registers (see LSI appendix - section 13.4) 2608 1.1 christos ; (fq0 1089) (fq1 1091) (fq2 1093) (fq3 1095) 2609 1.1 christos ; (fq4 1097) (fq5 1099) (fq6 1101) (fq7 1103) 2610 1.1 christos ; (fq8 1105) (fq9 1107) (fq10 1109) (fq11 1111) 2611 1.1 christos ; (fq12 1113) (fq13 1115) (fq14 1117) (fq15 1119) 2612 1.1 christos ; (fq16 1121) (fq17 1123) (fq18 1125) (fq19 1127) 2613 1.1 christos ; (fq20 1129) (fq21 1131) (fq22 1133) (fq23 1135) 2614 1.1 christos ; (fq24 1137) (fq25 1139) (fq26 1141) (fq27 1143) 2615 1.1 christos ; (fq28 1145) (fq29 1147) (fq30 1149) (fq31 1151) 2616 1.1 christos 2617 1.1 christos (mcilr0 1272) (mcilr1 1273) 2618 1.1 christos 2619 1.1 christos (msr0 1280) (msr1 1281) (msr2 1282) (msr3 1283) 2620 1.1 christos (msr4 1284) (msr5 1285) (msr6 1286) (msr7 1287) 2621 1.1 christos (msr8 1288) (msr9 1289) (msr10 1290) (msr11 1291) 2622 1.1 christos (msr12 1292) (msr13 1293) (msr14 1294) (msr15 1295) 2623 1.1 christos (msr16 1296) (msr17 1297) (msr18 1298) (msr19 1299) 2624 1.1 christos (msr20 1300) (msr21 1301) (msr22 1302) (msr23 1303) 2625 1.1 christos (msr24 1304) (msr25 1305) (msr26 1306) (msr27 1307) 2626 1.1 christos (msr28 1308) (msr29 1309) (msr30 1310) (msr31 1311) 2627 1.1 christos (msr32 1312) (msr33 1313) (msr34 1314) (msr35 1315) 2628 1.1 christos (msr36 1316) (msr37 1317) (msr38 1318) (msr39 1319) 2629 1.1 christos (msr40 1320) (msr41 1321) (msr42 1322) (msr43 1323) 2630 1.1 christos (msr44 1324) (msr45 1325) (msr46 1326) (msr47 1327) 2631 1.1 christos (msr48 1328) (msr49 1329) (msr50 1330) (msr51 1331) 2632 1.1 christos (msr52 1332) (msr53 1333) (msr54 1334) (msr55 1335) 2633 1.1 christos (msr56 1336) (msr57 1337) (msr58 1338) (msr59 1339) 2634 1.1 christos (msr60 1340) (msr61 1341) (msr62 1342) (msr63 1343) 2635 1.1 christos 2636 1.1 christos ; MQ0-MQ31 are 64 bit registers. 2637 1.1 christos ; These names allow access to the upper 32 bits of the MQ registers. 2638 1.1 christos (mqop0 1344) (mqop1 1346) (mqop2 1348) (mqop3 1350) 2639 1.1 christos (mqop4 1352) (mqop5 1354) (mqop6 1356) (mqop7 1358) 2640 1.1 christos (mqop8 1360) (mqop9 1362) (mqop10 1364) (mqop11 1366) 2641 1.1 christos (mqop12 1368) (mqop13 1370) (mqop14 1372) (mqop15 1374) 2642 1.1 christos (mqop16 1376) (mqop17 1378) (mqop18 1380) (mqop19 1382) 2643 1.1 christos (mqop20 1384) (mqop21 1386) (mqop22 1388) (mqop23 1390) 2644 1.1 christos (mqop24 1392) (mqop25 1394) (mqop26 1396) (mqop27 1398) 2645 1.1 christos (mqop28 1400) (mqop29 1402) (mqop30 1404) (mqop31 1406) 2646 1.1 christos ; These names allow access to the lower 32 bits of the MQ registers. 2647 1.1 christos (mqst0 1345) (mqst1 1347) (mqst2 1349) (mqst3 1351) 2648 1.1 christos (mqst4 1353) (mqst5 1355) (mqst6 1357) (mqst7 1359) 2649 1.1 christos (mqst8 1361) (mqst9 1363) (mqst10 1365) (mqst11 1367) 2650 1.1 christos (mqst12 1369) (mqst13 1371) (mqst14 1373) (mqst15 1375) 2651 1.1 christos (mqst16 1377) (mqst17 1379) (mqst18 1381) (mqst19 1383) 2652 1.1 christos (mqst20 1385) (mqst21 1387) (mqst22 1389) (mqst23 1391) 2653 1.1 christos (mqst24 1393) (mqst25 1395) (mqst26 1397) (mqst27 1399) 2654 1.1 christos (mqst28 1401) (mqst29 1403) (mqst30 1405) (mqst31 1407) 2655 1.1 christos ; These also access the lower 32 bits of the MQ registers. 2656 1.1 christos ; These are not accessible as spr registers (see LSI appendix - section 13.4) 2657 1.1 christos ; (mq0 1345) (mq1 1347) (mq2 1349) (mq3 1351) 2658 1.1 christos ; (mq4 1353) (mq5 1355) (mq6 1357) (mq7 1359) 2659 1.1 christos ; (mq8 1361) (mq9 1363) (mq10 1365) (mq11 1367) 2660 1.1 christos ; (mq12 1369) (mq13 1371) (mq14 1373) (mq15 1375) 2661 1.1 christos ; (mq16 1377) (mq17 1379) (mq18 1381) (mq19 1383) 2662 1.1 christos ; (mq20 1385) (mq21 1387) (mq22 1389) (mq23 1391) 2663 1.1 christos ; (mq24 1393) (mq25 1395) (mq26 1397) (mq27 1399) 2664 1.1 christos ; (mq28 1401) (mq29 1403) (mq30 1405) (mq31 1407) 2665 1.1 christos 2666 1.1 christos ; These are not accessible as spr registers (see LSI appendix - section 13.4) 2667 1.1 christos ; (acc0 1408) (acc1 1409) (acc2 1410) (acc3 1411) 2668 1.1 christos ; (acc4 1412) (acc5 1413) (acc6 1414) (acc7 1415) 2669 1.1 christos ; (acc8 1416) (acc9 1417) (acc10 1418) (acc11 1419) 2670 1.1 christos ; (acc12 1420) (acc13 1421) (acc14 1422) (acc15 1423) 2671 1.1 christos ; (acc16 1424) (acc17 1425) (acc18 1426) (acc19 1427) 2672 1.1 christos ; (acc20 1428) (acc21 1429) (acc22 1430) (acc23 1431) 2673 1.1 christos ; (acc24 1432) (acc25 1433) (acc26 1434) (acc27 1435) 2674 1.1 christos ; (acc28 1436) (acc29 1437) (acc30 1438) (acc31 1439) 2675 1.1 christos ; (acc32 1440) (acc33 1441) (acc34 1442) (acc35 1443) 2676 1.1 christos ; (acc36 1444) (acc37 1445) (acc38 1446) (acc39 1447) 2677 1.1 christos ; (acc40 1448) (acc41 1449) (acc42 1450) (acc43 1451) 2678 1.1 christos ; (acc44 1452) (acc45 1453) (acc46 1454) (acc47 1455) 2679 1.1 christos ; (acc48 1456) (acc49 1457) (acc50 1458) (acc51 1459) 2680 1.1 christos ; (acc52 1460) (acc53 1461) (acc54 1462) (acc55 1463) 2681 1.1 christos ; (acc56 1464) (acc57 1465) (acc58 1466) (acc59 1467) 2682 1.1 christos ; (acc60 1468) (acc61 1469) (acc62 1470) (acc63 1471) 2683 1.1 christos 2684 1.1 christos ; (accg0 1472) (accg1 1473) (accg2 1474) (accg3 1475) 2685 1.1 christos ; (accg4 1476) (accg5 1477) (accg6 1478) (accg7 1479) 2686 1.1 christos ; (accg8 1480) (accg9 1481) (accg10 1482) (accg11 1483) 2687 1.1 christos ; (accg12 1484) (accg13 1485) (accg14 1486) (accg15 1487) 2688 1.1 christos ; (accg16 1488) (accg17 1489) (accg18 1490) (accg19 1491) 2689 1.1 christos ; (accg20 1492) (accg21 1493) (accg22 1494) (accg23 1495) 2690 1.1 christos ; (accg24 1496) (accg25 1497) (accg26 1498) (accg27 1499) 2691 1.1 christos ; (accg28 1500) (accg29 1501) (accg30 1502) (accg31 1503) 2692 1.1 christos ; (accg32 1504) (accg33 1505) (accg34 1506) (accg35 1507) 2693 1.1 christos ; (accg36 1508) (accg37 1509) (accg38 1510) (accg39 1511) 2694 1.1 christos ; (accg40 1512) (accg41 1513) (accg42 1514) (accg43 1515) 2695 1.1 christos ; (accg44 1516) (accg45 1517) (accg46 1518) (accg47 1519) 2696 1.1 christos ; (accg48 1520) (accg49 1521) (accg50 1522) (accg51 1523) 2697 1.1 christos ; (accg52 1524) (accg53 1525) (accg54 1526) (accg55 1527) 2698 1.1 christos ; (accg56 1528) (accg57 1529) (accg58 1530) (accg59 1531) 2699 1.1 christos ; (accg60 1532) (accg61 1533) (accg62 1534) (accg63 1535) 2700 1.1 christos 2701 1.1 christos (ear0 1536) (ear1 1537) (ear2 1538) (ear3 1539) 2702 1.1 christos (ear4 1540) (ear5 1541) (ear6 1542) (ear7 1543) 2703 1.1 christos (ear8 1544) (ear9 1545) (ear10 1546) (ear11 1547) 2704 1.1 christos (ear12 1548) (ear13 1549) (ear14 1550) (ear15 1551) 2705 1.1 christos (ear16 1552) (ear17 1553) (ear18 1554) (ear19 1555) 2706 1.1 christos (ear20 1556) (ear21 1557) (ear22 1558) (ear23 1559) 2707 1.1 christos (ear24 1560) (ear25 1561) (ear26 1562) (ear27 1563) 2708 1.1 christos (ear28 1564) (ear29 1565) (ear30 1566) (ear31 1567) 2709 1.1 christos (ear32 1568) (ear33 1569) (ear34 1570) (ear35 1571) 2710 1.1 christos (ear36 1572) (ear37 1573) (ear38 1574) (ear39 1575) 2711 1.1 christos (ear40 1576) (ear41 1577) (ear42 1578) (ear43 1579) 2712 1.1 christos (ear44 1580) (ear45 1581) (ear46 1582) (ear47 1583) 2713 1.1 christos (ear48 1584) (ear49 1585) (ear50 1586) (ear51 1587) 2714 1.1 christos (ear52 1588) (ear53 1589) (ear54 1590) (ear55 1591) 2715 1.1 christos (ear56 1592) (ear57 1593) (ear58 1594) (ear59 1595) 2716 1.1 christos (ear60 1596) (ear61 1597) (ear62 1598) (ear63 1599) 2717 1.1 christos 2718 1.1 christos (edr0 1600) (edr1 1601) (edr2 1602) (edr3 1603) 2719 1.1 christos (edr4 1604) (edr5 1605) (edr6 1606) (edr7 1607) 2720 1.1 christos (edr8 1608) (edr9 1609) (edr10 1610) (edr11 1611) 2721 1.1 christos (edr12 1612) (edr13 1613) (edr14 1614) (edr15 1615) 2722 1.1 christos (edr16 1616) (edr17 1617) (edr18 1618) (edr19 1619) 2723 1.1 christos (edr20 1620) (edr21 1621) (edr22 1622) (edr23 1623) 2724 1.1 christos (edr24 1624) (edr25 1625) (edr26 1626) (edr27 1627) 2725 1.1 christos (edr28 1628) (edr29 1629) (edr30 1630) (edr31 1631) 2726 1.1 christos (edr32 1632) (edr33 1636) (edr34 1634) (edr35 1635) 2727 1.1 christos (edr36 1636) (edr37 1637) (edr38 1638) (edr39 1639) 2728 1.1 christos (edr40 1640) (edr41 1641) (edr42 1642) (edr43 1643) 2729 1.1 christos (edr44 1644) (edr45 1645) (edr46 1646) (edr47 1647) 2730 1.1 christos (edr48 1648) (edr49 1649) (edr50 1650) (edr51 1651) 2731 1.1 christos (edr52 1652) (edr53 1653) (edr54 1654) (edr55 1655) 2732 1.1 christos (edr56 1656) (edr57 1657) (edr58 1658) (edr59 1659) 2733 1.1 christos (edr60 1660) (edr61 1661) (edr62 1662) (edr63 1663) 2734 1.1 christos 2735 1.1 christos (iamlr0 1664) (iamlr1 1665) (iamlr2 1666) (iamlr3 1667) 2736 1.1 christos (iamlr4 1668) (iamlr5 1669) (iamlr6 1670) (iamlr7 1671) 2737 1.1 christos (iamlr8 1672) (iamlr9 1673) (iamlr10 1674) (iamlr11 1675) 2738 1.1 christos (iamlr12 1676) (iamlr13 1677) (iamlr14 1678) (iamlr15 1679) 2739 1.1 christos (iamlr16 1680) (iamlr17 1681) (iamlr18 1682) (iamlr19 1683) 2740 1.1 christos (iamlr20 1684) (iamlr21 1685) (iamlr22 1686) (iamlr23 1687) 2741 1.1 christos (iamlr24 1688) (iamlr25 1689) (iamlr26 1690) (iamlr27 1691) 2742 1.1 christos (iamlr28 1692) (iamlr29 1693) (iamlr30 1694) (iamlr31 1695) 2743 1.1 christos (iamlr32 1696) (iamlr33 1697) (iamlr34 1698) (iamlr35 1699) 2744 1.1 christos (iamlr36 1700) (iamlr37 1701) (iamlr38 1702) (iamlr39 1703) 2745 1.1 christos (iamlr40 1704) (iamlr41 1705) (iamlr42 1706) (iamlr43 1707) 2746 1.1 christos (iamlr44 1708) (iamlr45 1709) (iamlr46 1710) (iamlr47 1711) 2747 1.1 christos (iamlr48 1712) (iamlr49 1713) (iamlr50 1714) (iamlr51 1715) 2748 1.1 christos (iamlr52 1716) (iamlr53 1717) (iamlr54 1718) (iamlr55 1719) 2749 1.1 christos (iamlr56 1720) (iamlr57 1721) (iamlr58 1722) (iamlr59 1723) 2750 1.1 christos (iamlr60 1724) (iamlr61 1725) (iamlr62 1726) (iamlr63 1727) 2751 1.1 christos 2752 1.1 christos (iampr0 1728) (iampr1 1729) (iampr2 1730) (iampr3 1731) 2753 1.1 christos (iampr4 1732) (iampr5 1733) (iampr6 1734) (iampr7 1735) 2754 1.1 christos (iampr8 1736) (iampr9 1737) (iampr10 1738) (iampr11 1739) 2755 1.1 christos (iampr12 1740) (iampr13 1741) (iampr14 1742) (iampr15 1743) 2756 1.1 christos (iampr16 1744) (iampr17 1745) (iampr18 1746) (iampr19 1747) 2757 1.1 christos (iampr20 1748) (iampr21 1749) (iampr22 1750) (iampr23 1751) 2758 1.1 christos (iampr24 1752) (iampr25 1753) (iampr26 1754) (iampr27 1755) 2759 1.1 christos (iampr28 1756) (iampr29 1757) (iampr30 1758) (iampr31 1759) 2760 1.1 christos (iampr32 1760) (iampr33 1761) (iampr34 1762) (iampr35 1763) 2761 1.1 christos (iampr36 1764) (iampr37 1765) (iampr38 1766) (iampr39 1767) 2762 1.1 christos (iampr40 1768) (iampr41 1769) (iampr42 1770) (iampr43 1771) 2763 1.1 christos (iampr44 1772) (iampr45 1773) (iampr46 1774) (iampr47 1775) 2764 1.1 christos (iampr48 1776) (iampr49 1777) (iampr50 1778) (iampr51 1779) 2765 1.1 christos (iampr52 1780) (iampr53 1781) (iampr54 1782) (iampr55 1783) 2766 1.1 christos (iampr56 1784) (iampr57 1785) (iampr58 1786) (iampr59 1787) 2767 1.1 christos (iampr60 1788) (iampr61 1789) (iampr62 1790) (iampr63 1791) 2768 1.1 christos 2769 1.1 christos (damlr0 1792) (damlr1 1793) (damlr2 1794) (damlr3 1795) 2770 1.1 christos (damlr4 1796) (damlr5 1797) (damlr6 1798) (damlr7 1799) 2771 1.1 christos (damlr8 1800) (damlr9 1801) (damlr10 1802) (damlr11 1803) 2772 1.1 christos (damlr12 1804) (damlr13 1805) (damlr14 1806) (damlr15 1807) 2773 1.1 christos (damlr16 1808) (damlr17 1809) (damlr18 1810) (damlr19 1811) 2774 1.1 christos (damlr20 1812) (damlr21 1813) (damlr22 1814) (damlr23 1815) 2775 1.1 christos (damlr24 1816) (damlr25 1817) (damlr26 1818) (damlr27 1819) 2776 1.1 christos (damlr28 1820) (damlr29 1821) (damlr30 1822) (damlr31 1823) 2777 1.1 christos (damlr32 1824) (damlr33 1825) (damlr34 1826) (damlr35 1827) 2778 1.1 christos (damlr36 1828) (damlr37 1829) (damlr38 1830) (damlr39 1831) 2779 1.1 christos (damlr40 1832) (damlr41 1833) (damlr42 1834) (damlr43 1835) 2780 1.1 christos (damlr44 1836) (damlr45 1837) (damlr46 1838) (damlr47 1839) 2781 1.1 christos (damlr48 1840) (damlr49 1841) (damlr50 1842) (damlr51 1843) 2782 1.1 christos (damlr52 1844) (damlr53 1845) (damlr54 1846) (damlr55 1847) 2783 1.1 christos (damlr56 1848) (damlr57 1849) (damlr58 1850) (damlr59 1851) 2784 1.1 christos (damlr60 1852) (damlr61 1853) (damlr62 1854) (damlr63 1855) 2785 1.1 christos 2786 1.1 christos (dampr0 1856) (dampr1 1857) (dampr2 1858) (dampr3 1859) 2787 1.1 christos (dampr4 1860) (dampr5 1861) (dampr6 1862) (dampr7 1863) 2788 1.1 christos (dampr8 1864) (dampr9 1865) (dampr10 1866) (dampr11 1867) 2789 1.1 christos (dampr12 1868) (dampr13 1869) (dampr14 1870) (dampr15 1871) 2790 1.1 christos (dampr16 1872) (dampr17 1873) (dampr18 1874) (dampr19 1875) 2791 1.1 christos (dampr20 1876) (dampr21 1877) (dampr22 1878) (dampr23 1879) 2792 1.1 christos (dampr24 1880) (dampr25 1881) (dampr26 1882) (dampr27 1883) 2793 1.1 christos (dampr28 1884) (dampr29 1885) (dampr30 1886) (dampr31 1887) 2794 1.1 christos (dampr32 1888) (dampr33 1889) (dampr34 1890) (dampr35 1891) 2795 1.1 christos (dampr36 1892) (dampr37 1893) (dampr38 1894) (dampr39 1895) 2796 1.1 christos (dampr40 1896) (dampr41 1897) (dampr42 1898) (dampr43 1899) 2797 1.1 christos (dampr44 1900) (dampr45 1901) (dampr46 1902) (dampr47 1903) 2798 1.1 christos (dampr48 1904) (dampr49 1905) (dampr50 1906) (dampr51 1907) 2799 1.1 christos (dampr52 1908) (dampr53 1909) (dampr54 1910) (dampr55 1911) 2800 1.1 christos (dampr56 1912) (dampr57 1913) (dampr58 1914) (dampr59 1915) 2801 1.1 christos (dampr60 1916) (dampr61 1917) (dampr62 1918) (dampr63 1919) 2802 1.1 christos 2803 1.1 christos (amcr 1920) (stbar 1921) (mmcr 1922) 2804 1.1 christos (iamvr1 1925) (damvr1 1927) 2805 1.1 christos (cxnr 1936) (ttbr 1937) (tplr 1938) (tppr 1939) 2806 1.1 christos (tpxr 1940) 2807 1.1 christos (timerh 1952) (timerl 1953) (timerd 1954) 2808 1.1 christos (dcr 2048) (brr 2049) (nmar 2050) (btbr 2051) 2809 1.1 christos 2810 1.1 christos (ibar0 2052) (ibar1 2053) (ibar2 2054) (ibar3 2055) 2811 1.1 christos (dbar0 2056) (dbar1 2057) (dbar2 2058) (dbar3 2059) 2812 1.1 christos 2813 1.1 christos (dbdr00 2060) (dbdr01 2061) (dbdr02 2062) (dbdr03 2063) 2814 1.1 christos (dbdr10 2064) (dbdr11 2065) (dbdr12 2066) (dbdr13 2067) 2815 1.1 christos (dbdr20 2068) (dbdr21 2069) (dbdr22 2070) (dbdr23 2071) 2816 1.1 christos (dbdr30 2072) (dbdr31 2073) (dbdr32 2074) (dbdr33 2075) 2817 1.1 christos 2818 1.1 christos (dbmr00 2076) (dbmr01 2077) (dbmr02 2078) (dbmr03 2079) 2819 1.1 christos (dbmr10 2080) (dbmr11 2081) (dbmr12 2082) (dbmr13 2083) 2820 1.1 christos (dbmr20 2084) (dbmr21 2085) (dbmr22 2086) (dbmr23 2087) 2821 1.1 christos (dbmr30 2088) (dbmr31 2089) (dbmr32 2090) (dbmr33 2091) 2822 1.1 christos 2823 1.1 christos (cpcfr 2304) (cpcr 2305) (cpsr 2306) (cptr 2307) 2824 1.1 christos (cphsr0 2308) (cphsr1 2309) (cpesr0 2320) (cpesr1 2321) 2825 1.1 christos (cpemr0 2322) (cpemr1 2323) 2826 1.1 christos 2827 1.1 christos (iperr0 2324) (iperr1 2325) (ipjsr 2326) (ipjrr 2327) 2828 1.1 christos (ipcsr0 2336) (ipcsr1 2337) (ipcwer0 2338) (ipcwer1 2339) 2829 1.1 christos (ipcwr 2340) 2830 1.1 christos 2831 1.1 christos (mbhsr 2352) (mbssr 2353) (mbrsr 2354) (mbsdr 2355) 2832 1.1 christos (mbrdr 2356) (mbsmr 2357) (mbstr0 2359) (mbstr1 2360) 2833 1.1 christos 2834 1.1 christos (slpr 2368) (sldr 2369) (slhsr 2370) (sltr 2371) 2835 1.1 christos (slwr 2372) 2836 1.1 christos 2837 1.1 christos (ihsr8 3848) (ihsr9 3849) (ihsr10 3850) 2838 1.1 christos ) 2839 1.1 christos ) 2840 1.1 christos 2841 1.1 christos (define-hardware 2842 1.1 christos (name h-spr) 2843 1.1 christos (comment "special purpose registers") 2844 1.1 christos (attrs PROFILE) 2845 1.1 christos (type register UWI (4096)) 2846 1.1 christos (indices extern-keyword spr-names) 2847 1.1 christos (get (index) (c-call UWI "@cpu@_h_spr_get_handler" index)) 2848 1.1 christos (set (index newval) (c-call VOID "@cpu@_h_spr_set_handler" index newval)) 2849 1.1 christos ) 2850 1.1 christos 2851 1.1 christos (define-pmacro (spr-pcsr) (reg h-spr 1)) 2852 1.1 christos (define-pmacro (spr-bpcsr) (reg h-spr 2)) 2853 1.1 christos (define-pmacro (spr-lr) (reg h-spr 272)) 2854 1.1 christos (define-pmacro (spr-lcr) (reg h-spr 273)) 2855 1.1 christos (define-pmacro (spr-iacc0h) (reg h-spr 280)) 2856 1.1 christos (define-pmacro (spr-iacc0l) (reg h-spr 281)) 2857 1.1 christos (define-pmacro (spr-sr0) (reg h-spr 768)) 2858 1.1 christos (define-pmacro (spr-sr1) (reg h-spr 769)) 2859 1.1 christos (define-pmacro (spr-sr2) (reg h-spr 770)) 2860 1.1 christos (define-pmacro (spr-sr3) (reg h-spr 771)) 2861 1.1 christos 2862 1.1 christos ; Accumulator guard. Actually a subset of the SPR registers, but those SPRs 2863 1.1 christos ; are read-only in most insns. This hardware element is used by those insns 2864 1.1 christos ; which have direct access (mwtaccg, mrdaccg). 2865 1.1 christos (define-keyword 2866 1.1 christos (name accg-names) 2867 1.1 christos (print-name h-accg) 2868 1.1 christos (prefix "") 2869 1.1 christos (values 2870 1.1 christos (accg0 0)(accg1 1)(accg2 2)(accg3 3) 2871 1.1 christos (accg4 4)(accg5 5)(accg6 6)(accg7 7) 2872 1.1 christos (accg8 8)(accg9 9)(accg10 10)(accg11 11) 2873 1.1 christos (accg12 12)(accg13 13)(accg14 14)(accg15 15) 2874 1.1 christos (accg16 16)(accg17 17)(accg18 18)(accg19 19) 2875 1.1 christos (accg20 20)(accg21 21)(accg22 22)(accg23 23) 2876 1.1 christos (accg24 24)(accg25 25)(accg26 26)(accg27 27) 2877 1.1 christos (accg28 28)(accg29 29)(accg30 30)(accg31 31) 2878 1.1 christos (accg32 32)(accg33 33)(accg34 34)(accg35 35) 2879 1.1 christos (accg36 36)(accg37 37)(accg38 38)(accg39 39) 2880 1.1 christos (accg40 40)(accg41 41)(accg42 42)(accg43 43) 2881 1.1 christos (accg44 44)(accg45 45)(accg46 46)(accg47 47) 2882 1.1 christos (accg48 48)(accg49 49)(accg50 50)(accg51 51) 2883 1.1 christos (accg52 52)(accg53 53)(accg54 54)(accg55 55) 2884 1.1 christos (accg56 56)(accg57 57)(accg58 58)(accg59 59) 2885 1.1 christos (accg60 60)(accg61 61)(accg62 62)(accg63 63) 2886 1.1 christos ) 2887 1.1 christos ) 2888 1.1 christos 2889 1.1 christos (define-hardware 2890 1.1 christos (name h-accg) 2891 1.1 christos (comment "accumulator guard") 2892 1.1 christos (attrs PROFILE VIRTUAL) 2893 1.1 christos (type register UWI (64)) 2894 1.1 christos (indices extern-keyword accg-names) 2895 1.1 christos (get (index) 2896 1.1 christos (and (reg h-spr (add index 1472)) #xff)) 2897 1.1 christos (set (index newval) 2898 1.1 christos (set (raw-reg UWI h-spr (add index 1472)) (and newval #xff))) 2899 1.1 christos ) 2900 1.1 christos 2901 1.1 christos ; 40 bit accumulator. Composed of ACCG and ACC registers concatenated, but 2902 1.1 christos ; referenced more often as the composed 40 bits. 2903 1.1 christos (define-keyword 2904 1.1 christos (name acc-names) 2905 1.1 christos (print-name h-acc40) 2906 1.1 christos (prefix "") 2907 1.1 christos (values 2908 1.1 christos (acc0 0)(acc1 1)(acc2 2)(acc3 3)(acc4 4)(acc5 5)(acc6 6)(acc7 7) 2909 1.1 christos (acc8 8)(acc9 9)(acc10 10)(acc11 11)(acc12 12)(acc13 13)(acc14 14)(acc15 15) 2910 1.1 christos (acc16 16)(acc17 17)(acc18 18)(acc19 19)(acc20 20)(acc21 21)(acc22 22)(acc23 23) 2911 1.1 christos (acc24 24)(acc25 25)(acc26 26)(acc27 27)(acc28 28)(acc29 29)(acc30 30)(acc31 31) 2912 1.1 christos (acc32 32)(acc33 33)(acc34 34)(acc35 35)(acc36 36)(acc37 37)(acc38 38)(acc39 39) 2913 1.1 christos (acc40 40)(acc41 41)(acc42 42)(acc43 43)(acc44 44)(acc45 45)(acc46 46)(acc47 47) 2914 1.1 christos (acc48 48)(acc49 49)(acc50 50)(acc51 51)(acc52 52)(acc53 53)(acc54 54)(acc55 55) 2915 1.1 christos (acc56 56)(acc57 57)(acc58 58)(acc59 59)(acc60 60)(acc61 61)(acc62 62)(acc63 63) 2916 1.1 christos ) 2917 1.1 christos ) 2918 1.1 christos 2919 1.1 christos (define-hardware 2920 1.1 christos (name h-acc40S) 2921 1.1 christos (comment "40 bit signed accumulator") 2922 1.1 christos (attrs PROFILE VIRTUAL) 2923 1.1 christos (type register DI (64)) 2924 1.1 christos (indices extern-keyword acc-names) 2925 1.1 christos ; The accumlator is made up of two 32 bit registers, accgi/acci. 2926 1.1 christos ; We want to extract this as a combined 40 signed bits 2927 1.1 christos (get (index) 2928 1.1 christos (or DI 2929 1.1 christos (sll DI (ext DI (trunc QI (reg h-spr (add index 1472)))) 2930 1.1 christos 32) 2931 1.1 christos (zext DI (reg h-spr (add index 1408))))) 2932 1.1 christos ; Bits 40-63 are not written. raw-reg is used to bypass read-only restrictions 2933 1.1 christos ; on ACC and ACCG registers 2934 1.1 christos (set (index newval) 2935 1.1 christos (sequence () 2936 1.7 christos (c-call VOID "frv_check_spr_write_access" (add index 1408)) 2937 1.1 christos (set (raw-reg UWI h-spr 2938 1.1 christos (add index 1472)) (and (srl newval 32) #xff)) 2939 1.1 christos (set (raw-reg UWI h-spr 2940 1.1 christos (add index 1408)) (trunc USI newval)))) 2941 1.1 christos ) 2942 1.1 christos 2943 1.1 christos (define-hardware 2944 1.1 christos (name h-acc40U) 2945 1.1 christos (comment "40 bit unsigned accumulator") 2946 1.1 christos (attrs PROFILE VIRTUAL) 2947 1.1 christos (type register DI (64)) 2948 1.1 christos (indices extern-keyword acc-names) 2949 1.1 christos ; The accumlator is made up of two 32 bit registers, accgi/acci. 2950 1.1 christos ; We want to extract this as a combined 40 unsigned bits 2951 1.1 christos (get (index) 2952 1.1 christos (or DI 2953 1.1 christos (sll DI (zext DI (reg h-spr (add index 1472))) 32) 2954 1.1 christos (zext DI (reg h-spr (add index 1408))))) 2955 1.1 christos ; Bits 40-63 are not written. raw-reg is used to bypass read-only restrictions 2956 1.1 christos ; on ACC and ACCG registers 2957 1.1 christos (set (index newval) 2958 1.1 christos (sequence () 2959 1.1 christos (c-call VOID "frv_check_spr_write_access" (add index 1408)) 2960 1.1 christos (set (raw-reg UWI h-spr 2961 1.1 christos (add index 1472)) (and (srl newval 32) #xff)) 2962 1.1 christos (set (raw-reg UWI h-spr 2963 1.1 christos (add index 1408)) (trunc USI newval)))) 2964 1.1 christos ) 2965 1.1 christos ; 64-bit signed accumulator. Composed of iacc0h and iacc0l registers 2966 1.1 christos ; concatenated, but referenced more often as the composed 64 bits. 2967 1.1 christos (define-keyword 2968 1.1 christos ; This is totally hokey -- I have to have an index! 2969 1.1 christos (name iacc0-names) 2970 1.1 christos (print-name h-iacc0) 2971 1.1 christos (prefix "") 2972 1.1 christos (values (iacc0 0)) 2973 1.1 christos ) 2974 1.1 christos 2975 1.1 christos (define-hardware 2976 1.1 christos (name h-iacc0) 2977 1.1 christos (comment "64 bit signed accumulator") 2978 1.1 christos (attrs PROFILE VIRTUAL (MACH fr400,fr450)) 2979 1.1 christos (type register DI (1)) 2980 1.1 christos (indices extern-keyword iacc0-names) 2981 1.1 christos ; The single 64-bit integer accumulator is made up of two 32 bit 2982 1.1 christos ; registers, iacc0h and iacc0l. We want to extract this as a 2983 1.1 christos ; combined 64 signed bits. 2984 1.1 christos (get (idx) (or DI (sll DI (ext DI (spr-iacc0h)) 32) (zext DI (spr-iacc0l)))) 2985 1.1 christos (set (idx newval) 2986 1.1 christos (sequence () 2987 1.1 christos (set (spr-iacc0h) (trunc SI (srl newval 32))) 2988 1.1 christos (set (spr-iacc0l) (trunc SI newval)))) 2989 1.1 christos ) 2990 1.1 christos 2991 1.1 christos ; Integer condition code registers (CCR) 2992 1.1 christos ; 2993 1.1 christos ; The individual sub registers bits of the CCR are referenced more often than 2994 1.1 christos ; the entire register so set them directly. We can assemble the 2995 1.1 christos ; entire register when necessary. 2996 1.1 christos ; 2997 1.1 christos (define-keyword 2998 1.1 christos (name iccr-names) 2999 1.1 christos (print-name h-iccr) 3000 1.1 christos (prefix "") 3001 1.1 christos (values (icc0 0) (icc1 1) (icc2 2) (icc3 3)) 3002 1.1 christos ) 3003 1.1 christos 3004 1.1 christos (define-hardware 3005 1.1 christos (name h-iccr) 3006 1.1 christos (comment "Integer condition code registers") 3007 1.1 christos (attrs PROFILE) 3008 1.1 christos (type register UQI (4)) 3009 1.1 christos (indices extern-keyword iccr-names) 3010 1.1 christos ) 3011 1.1 christos 3012 1.1 christos ; Floating point condition code registers (CCR) 3013 1.1 christos ; 3014 1.1 christos ; The individual sub registers bits of the CCR are referenced more often than 3015 1.1 christos ; the entire register so set them directly. We can assemble the 3016 1.1 christos ; entire register when necessary. 3017 1.1 christos ; 3018 1.1 christos (define-keyword 3019 1.1 christos (name fccr-names) 3020 1.1 christos (print-name h-fccr) 3021 1.1 christos (prefix "") 3022 1.1 christos (values (fcc0 0) (fcc1 1) (fcc2 2) (fcc3 3)) 3023 1.1 christos ) 3024 1.1 christos 3025 1.1 christos (define-hardware 3026 1.1 christos (name h-fccr) 3027 1.1 christos (comment "Floating point condition code registers") 3028 1.1 christos (attrs PROFILE) 3029 1.1 christos (type register UQI (4)) 3030 1.1 christos (indices extern-keyword fccr-names) 3031 1.1 christos ) 3032 1.1 christos 3033 1.1 christos ; C condition code registers (CCCR) 3034 1.1 christos ; 3035 1.1 christos (define-keyword 3036 1.1 christos (name cccr-names) 3037 1.1 christos (print-name h-cccr) 3038 1.1 christos (prefix "") 3039 1.1 christos (values (cc0 0) (cc1 1) (cc2 2) (cc3 3) (cc4 4) (cc5 5) (cc6 6) (cc7 7)) 3040 1.1 christos ) 3041 1.1 christos 3042 1.1 christos (define-hardware 3043 1.1 christos (name h-cccr) 3044 1.1 christos (comment "Condition code registers") 3045 1.1 christos (attrs PROFILE) 3046 1.1 christos (type register UQI (8)) 3047 1.1 christos (indices extern-keyword cccr-names) 3048 1.1 christos ) 3049 1.1 christos 3051 1.1 christos ; Dummy hardware used to define packing bit on insns 3052 1.1 christos ; 3053 1.1 christos (define-hardware 3054 1.1 christos (name h-pack) 3055 1.1 christos (comment "Packing bit dummy hardware") 3056 1.1 christos (type immediate (UINT 1)) 3057 1.1 christos (values keyword "" (("" 1) (".p" 0) (".P" 0))) 3058 1.1 christos ) 3059 1.1 christos ; Dummy hardware used to define hint field for branches always taken 3060 1.1 christos ; 3061 1.1 christos (define-hardware 3062 1.1 christos (name h-hint-taken) 3063 1.1 christos (comment "Branch taken hint dummy hardware") 3064 1.1 christos (type immediate (UINT 1)) 3065 1.1 christos ; The order of these is important. We want '2' to get written by default, 3066 1.1 christos ; but we also want the docoder/disassembler to allow the values '0', '1' and 3067 1.1 christos ; '3'. 3068 1.1 christos (values keyword "" (("" 2) ("" 0) ("" 1) ("" 3))) 3069 1.1 christos ) 3070 1.1 christos ; Dummy hardware used to define hint field for branches never taken 3071 1.1 christos ; 3072 1.1 christos (define-hardware 3073 1.1 christos (name h-hint-not-taken) 3074 1.1 christos (comment "Branch not taken hint dummy hardware") 3075 1.1 christos (type immediate (UINT 1)) 3076 1.1 christos ; The order of these is important. We want '0' to get written by default, 3077 1.1 christos ; but we also want the docoder/disassembler to allow the values '1', '2' and 3078 1.1 christos ; '3'. 3079 1.1 christos (values keyword "" (("" 0) ("" 1) ("" 2) ("" 3))) 3080 1.1 christos ) 3081 1.1 christos 3083 1.1 christos ; Instruction Operands. 3084 1.1 christos ; These entries provide a layer between the assembler and the raw hardware 3085 1.1 christos ; description, and are used to refer to hardware elements in the semantic 3086 1.1 christos ; code. Usually there's a bit of over-specification, but in more complicated 3087 1.1 christos ; instruction sets there isn't. 3088 1.1 christos 3089 1.1 christos ; FRV specific operand attributes: 3090 1.1 christos 3091 1.1 christos (define-attr 3092 1.1 christos (for operand) 3093 1.1 christos (type boolean) 3094 1.1 christos (name HASH-PREFIX) 3095 1.1 christos (comment "immediates have an optional '#' prefix") 3096 1.1 christos ) 3097 1.1 christos 3098 1.1 christos ; ??? Convention says this should be o-sr, but then the insn definitions 3099 1.1 christos ; should refer to o-sr which is clumsy. The "o-" could be implicit, but 3100 1.1 christos ; then it should be implicit for all the symbols here, but then there would 3101 1.1 christos ; be confusion between (f-)simm8 and (h-)simm8. 3102 1.1 christos ; So for now the rule is exactly as it appears here. 3103 1.1 christos 3104 1.1 christos ; dnmop: define-normal-mode-operand: temporary, pending potential removal 3105 1.1 christos ; of modes from h/w. 3106 1.1 christos (define-pmacro (dnmop xname xcomment xattrs xtype xindex xmode) 3107 1.1 christos (define-operand 3108 1.1 christos (name xname) 3109 1.1 christos (comment xcomment) 3110 1.1 christos (.splice attrs (.unsplice xattrs)) 3111 1.1 christos (type xtype) 3112 1.1 christos (index xindex) 3113 1.1 christos (mode xmode) 3114 1.1 christos ) 3115 1.1 christos ) 3116 1.1 christos 3117 1.1 christos ; dnpmop: define-normal-parsed-mode-operand: Normal mode operand with parse handler 3118 1.1 christos (define-pmacro (dnpmop xname xcomment xattrs xtype xindex xmode xparse) 3119 1.1 christos (define-operand 3120 1.1 christos (name xname) 3121 1.1 christos (comment xcomment) 3122 1.1 christos (.splice attrs (.unsplice xattrs)) 3123 1.1 christos (type xtype) 3124 1.1 christos (index xindex) 3125 1.1 christos (mode xmode) 3126 1.1 christos (handlers (parse xparse)) 3127 1.1 christos ) 3128 1.1 christos ) 3129 1.1 christos 3130 1.1 christos (dnop pack "packing bit" () h-pack f-pack) 3131 1.1 christos 3132 1.1 christos (dnmop GRi "source register 1" () h-gr f-GRi SI) 3133 1.1 christos (dnmop GRj "source register 2" () h-gr f-GRj SI) 3134 1.1 christos (dnmop GRk "destination register" () h-gr f-GRk SI) 3135 1.1 christos (dnmop GRkhi "destination register" () h-gr_hi f-GRk UHI) 3136 1.1 christos (dnmop GRklo "destination register" () h-gr_lo f-GRk UHI) 3137 1.1 christos (dnpmop GRdoublek "destination register" () h-gr_double f-GRk DI "even_register") 3138 1.1 christos (dnmop ACC40Si "signed accumulator" () h-acc40S f-ACC40Si DI) 3139 1.1 christos (dnmop ACC40Ui "unsigned accumulator" () h-acc40U f-ACC40Ui UDI) 3140 1.1 christos (dnmop ACC40Sk "target accumulator" () h-acc40S f-ACC40Sk DI) 3141 1.1 christos (dnmop ACC40Uk "target accumulator" () h-acc40U f-ACC40Uk UDI) 3142 1.1 christos (dnmop ACCGi "source register" () h-accg f-ACCGi UWI) 3143 1.1 christos (dnmop ACCGk "target register" () h-accg f-ACCGk UWI) 3144 1.1 christos 3145 1.1 christos (dnmop CPRi "source register" ((MACH frv)) h-cpr f-CPRi SI) 3146 1.1 christos (dnmop CPRj "source register" ((MACH frv)) h-cpr f-CPRj SI) 3147 1.1 christos (dnmop CPRk "destination register" ((MACH frv)) h-cpr f-CPRk SI) 3148 1.1 christos (dnpmop CPRdoublek "destination register" ((MACH frv)) h-cpr_double f-CPRk DI "even_register") 3149 1.1 christos 3150 1.1 christos ; floating point operands 3151 1.1 christos (dnmop FRinti "source register 1" () h-fr_int f-FRi SI) 3152 1.1 christos (dnmop FRintj "source register 2" () h-fr_int f-FRj SI) 3153 1.1 christos (dnmop FRintk "target register" () h-fr_int f-FRk SI) 3154 1.1 christos (dnmop FRi "source register 1" () h-fr f-FRi SF) 3155 1.1 christos (dnmop FRj "source register 2" () h-fr f-FRj SF) 3156 1.1 christos (dnmop FRk "destination register" () h-fr f-FRk SF) 3157 1.1 christos (dnmop FRkhi "destination register" () h-fr_hi f-FRk UHI) 3158 1.1 christos (dnmop FRklo "destination register" () h-fr_lo f-FRk UHI) 3159 1.1 christos (dnpmop FRdoublei "source register 1" () h-fr_double f-FRi DF "even_register") 3160 1.1 christos (dnpmop FRdoublej "source register 2" () h-fr_double f-FRj DF "even_register") 3161 1.1 christos (dnpmop FRdoublek "target register" () h-fr_double f-FRk DF "even_register") 3162 1.1 christos 3163 1.1 christos (dnop CRi "source register 1" () h-cccr f-CRi) 3164 1.1 christos (dnop CRj "source register 2" () h-cccr f-CRj) 3165 1.1 christos (dnop CRj_int "destination register" () h-cccr f-CRj_int) 3166 1.1 christos (dnop CRj_float "destination register" () h-cccr f-CRj_float) 3167 1.1 christos (dnop CRk "destination register" () h-cccr f-CRk) 3168 1.1 christos (dnop CCi "condition register" () h-cccr f-CCi) 3169 1.1 christos 3170 1.1 christos (dnop ICCi_1 "condition register" () h-iccr f-ICCi_1) 3171 1.1 christos (dnop ICCi_2 "condition register" () h-iccr f-ICCi_2) 3172 1.1 christos (dnop ICCi_3 "condition register" () h-iccr f-ICCi_3) 3173 1.1 christos (dnop FCCi_1 "condition register" () h-fccr f-FCCi_1) 3174 1.1 christos (dnop FCCi_2 "condition register" () h-fccr f-FCCi_2) 3175 1.1 christos (dnop FCCi_3 "condition register" () h-fccr f-FCCi_3) 3176 1.1 christos (dnop FCCk "condition register" () h-fccr f-FCCk) 3177 1.1 christos 3178 1.1 christos (dnop eir "exception insn reg" () h-uint f-eir) 3179 1.1 christos (dnop s10 "10 bit signed immediate" (HASH-PREFIX) h-sint f-s10) 3180 1.1 christos (dnop u16 "16 bit unsigned immediate" (HASH-PREFIX) h-uint f-u16) 3181 1.1 christos (dnop s16 "16 bit signed immediate" (HASH-PREFIX) h-sint f-s16) 3182 1.1 christos (dnop s6 "6 bit signed immediate" (HASH-PREFIX) h-sint f-s6) 3183 1.1 christos (dnop s6_1 "6 bit signed immediate" (HASH-PREFIX) h-sint f-s6_1) 3184 1.1 christos (dnop u6 "6 bit unsigned immediate" (HASH-PREFIX) h-uint f-u6) 3185 1.1 christos (dnop s5 "5 bit signed immediate" (HASH-PREFIX) h-sint f-s5) 3186 1.1 christos (dnop cond "conditional arithmetic" (HASH-PREFIX) h-uint f-cond) 3187 1.1 christos (dnop ccond "lr branch condition" (HASH-PREFIX) h-uint f-ccond) 3188 1.1 christos (dnop hint "2 bit branch predictor" (HASH-PREFIX) h-uint f-hint) 3189 1.1 christos (dnop hint_taken "2 bit branch predictor" () h-hint-taken f-hint) 3190 1.1 christos (dnop hint_not_taken "2 bit branch predictor" () h-hint-not-taken f-hint) 3191 1.1 christos 3192 1.1 christos (dnop LI "link indicator" () h-uint f-LI) 3193 1.1 christos (dnop lock "cache lock indicator" (HASH-PREFIX) h-uint f-lock) 3194 1.1 christos (dnop debug "debug mode indicator" (HASH-PREFIX) h-uint f-debug) 3195 1.1 christos (dnop ae "all entries indicator" (HASH-PREFIX) h-uint f-ae) 3196 1.1 christos 3197 1.1 christos (dnop label16 "18 bit pc relative address" () h-iaddr f-label16) 3198 1.1 christos 3199 1.1 christos (dnop LRAE "Load Real Address E flag" () h-uint f-LRAE) 3200 1.1 christos (dnop LRAD "Load Real Address D flag" () h-uint f-LRAD) 3201 1.1 christos (dnop LRAS "Load Real Address S flag" () h-uint f-LRAS) 3202 1.1 christos 3203 1.1 christos (dnop TLBPRopx "TLB Probe operation number" () h-uint f-TLBPRopx) 3204 1.1 christos (dnop TLBPRL "TLB Probe L flag" () h-uint f-TLBPRL) 3205 1.1 christos 3206 1.1 christos (define-operand 3207 1.1 christos (name A0) 3208 1.1 christos (comment "A==0 operand of mclracc") 3209 1.1 christos (attrs) 3210 1.1 christos (type h-uint) 3211 1.1 christos (index f-A) 3212 1.1 christos (mode USI) 3213 1.1 christos (handlers (parse "A0")) 3214 1.1 christos ) 3215 1.1 christos 3216 1.1 christos (define-operand 3217 1.1 christos (name A1) 3218 1.1 christos (comment "A==1 operand of mclracc") 3219 1.1 christos (attrs) 3220 1.1 christos (type h-uint) 3221 1.1 christos (index f-A) 3222 1.1 christos (mode USI) 3223 1.1 christos (handlers (parse "A1")) 3224 1.1 christos ) 3225 1.1 christos 3226 1.1 christos (define-operand 3227 1.1 christos (name FRintieven) 3228 1.1 christos (comment "(even) source register 1") 3229 1.1 christos (attrs) 3230 1.1 christos (type h-fr_int) 3231 1.1 christos (index f-FRi) 3232 1.1 christos (mode SI) 3233 1.1 christos (handlers (parse "even_register")) 3234 1.1 christos ) 3235 1.1 christos 3236 1.1 christos (define-operand 3237 1.1 christos (name FRintjeven) 3238 1.1 christos (comment "(even) source register 2") 3239 1.1 christos (attrs) 3240 1.1 christos (type h-fr_int) 3241 1.1 christos (index f-FRj) 3242 1.1 christos (mode SI) 3243 1.1 christos (handlers (parse "even_register")) 3244 1.1 christos ) 3245 1.1 christos 3246 1.1 christos (define-operand 3247 1.1 christos (name FRintkeven) 3248 1.1 christos (comment "(even) target register") 3249 1.1 christos (attrs) 3250 1.1 christos (type h-fr_int) 3251 1.1 christos (index f-FRk) 3252 1.1 christos (mode SI) 3253 1.1 christos (handlers (parse "even_register")) 3254 1.1 christos ) 3255 1.1 christos 3256 1.1 christos (define-operand 3257 1.1 christos (name d12) 3258 1.1 christos (comment "12 bit signed immediate") 3259 1.1 christos (attrs) 3260 1.1 christos (type h-sint) 3261 1.1 christos (index f-d12) 3262 1.1 christos (handlers (parse "d12")) 3263 1.1 christos ) 3264 1.1 christos 3265 1.1 christos (define-operand 3266 1.1 christos (name s12) 3267 1.1 christos (comment "12 bit signed immediate") 3268 1.1 christos (attrs HASH-PREFIX) 3269 1.1 christos (type h-sint) 3270 1.1 christos (index f-d12) 3271 1.1 christos (handlers (parse "s12")) 3272 1.1 christos ) 3273 1.1 christos 3274 1.1 christos (define-operand 3275 1.1 christos (name u12) 3276 1.1 christos (comment "12 bit signed immediate") 3277 1.1 christos (attrs HASH-PREFIX) 3278 1.1 christos (type h-sint) 3279 1.1 christos (index f-u12) 3280 1.1 christos (handlers (parse "u12")) 3281 1.1 christos ) 3282 1.1 christos 3283 1.1 christos (define-operand 3284 1.1 christos (name spr) 3285 1.1 christos (comment "special purpose register") 3286 1.1 christos (attrs) 3287 1.1 christos (type h-spr) 3288 1.1 christos (index f-spr) 3289 1.1 christos (handlers (parse "spr") (print "spr")) 3290 1.1 christos ) 3291 1.1 christos 3292 1.1 christos (define-operand 3293 1.1 christos (name ulo16) 3294 1.1 christos (comment "16 bit unsigned immediate, for #lo()") 3295 1.1 christos (attrs) 3296 1.1 christos (type h-uint) 3297 1.1 christos (index f-u16) 3298 1.1 christos (handlers (parse "ulo16") (print "lo")) 3299 1.1 christos ) 3300 1.1 christos 3301 1.1 christos (define-operand 3302 1.1 christos (name slo16) 3303 1.1 christos (comment "16 bit unsigned immediate, for #lo()") 3304 1.1 christos (attrs) 3305 1.1 christos (type h-sint) 3306 1.1 christos (index f-s16) 3307 1.1 christos (handlers (parse "uslo16") (print "lo")) 3308 1.1 christos ) 3309 1.1 christos 3310 1.1 christos (define-operand 3311 1.1 christos (name uhi16) 3312 1.1 christos (comment "16 bit unsigned immediate, for #hi()") 3313 1.1 christos (attrs) 3314 1.1 christos (type h-uint) 3315 1.1 christos (index f-u16) 3316 1.1 christos (handlers (parse "uhi16") (print "hi")) 3317 1.1 christos ) 3318 1.1 christos 3319 1.1 christos (define-operand 3320 1.1 christos (name label24) 3321 1.1 christos (comment "26 bit pc relative address") 3322 1.1 christos (attrs) 3323 1.1 christos (type h-iaddr) 3324 1.1 christos (index f-label24) 3325 1.1 christos (mode SI) 3326 1.1 christos (handlers (parse "call_label")) 3327 1.1 christos ) 3328 1.1 christos 3329 1.1 christos ; operands representing hardware 3330 1.1 christos ; 3331 1.1 christos (dnop psr_esr "PSR.ESR bit" (SEM-ONLY) h-psr_esr f-nil) 3332 1.1 christos (dnop psr_s "PSR.S bit" (SEM-ONLY) h-psr_s f-nil) 3333 1.1 christos (dnop psr_ps "PSR.PS bit" (SEM-ONLY) h-psr_ps f-nil) 3334 1.1 christos (dnop psr_et "PSR.ET bit" (SEM-ONLY) h-psr_et f-nil) 3335 1.1 christos 3336 1.1 christos (dnop bpsr_bs "BPSR.BS bit" (SEM-ONLY) h-bpsr_bs f-nil) 3337 1.1 christos (dnop bpsr_bet "BPSR.BET bit" (SEM-ONLY) h-bpsr_bet f-nil) 3338 1.1 christos 3339 1.1 christos (dnop tbr_tba "TBR.TBA" (SEM-ONLY) h-tbr_tba f-nil) 3340 1.1 christos (dnop tbr_tt "TBR.TT" (SEM-ONLY) h-tbr_tt f-nil) 3341 1.1 christos 3342 1.1 christos ; Null operands 3343 1.1 christos ; 3344 1.1 christos (define-pmacro (ICCi_1-null) (f-ICCi_1-null 0)) 3345 1.1 christos (define-pmacro (ICCi_2-null) (f-ICCi_2-null 0)) 3346 1.1 christos (define-pmacro (ICCi_3-null) (f-ICCi_3-null 0)) 3347 1.1 christos (define-pmacro (FCCi_1-null) (f-FCCi_1-null 0)) 3348 1.1 christos (define-pmacro (FCCi_2-null) (f-FCCi_2-null 0)) 3349 1.1 christos (define-pmacro (FCCi_3-null) (f-FCCi_3-null 0)) 3350 1.1 christos (define-pmacro (rs-null) (f-rs-null 0)) 3351 1.1 christos (define-pmacro (GRi-null) (f-GRi-null 0)) 3352 1.1 christos (define-pmacro (GRj-null) (f-GRj-null 0)) 3353 1.1 christos (define-pmacro (GRk-null) (f-GRk-null 0)) 3354 1.1 christos (define-pmacro (FRi-null) (f-FRi-null 0)) 3355 1.1 christos (define-pmacro (FRj-null) (f-FRj-null 0)) 3356 1.1 christos (define-pmacro (ACCj-null) (f-ACCj-null 0)) 3357 1.1 christos (define-pmacro (rd-null) (f-rd-null 0)) 3358 1.1 christos (define-pmacro (cond-null) (f-cond-null 0)) 3359 1.1 christos (define-pmacro (ccond-null) (f-ccond-null 0)) 3360 1.1 christos (define-pmacro (s12-null) (f-s12-null 0)) 3361 1.1 christos (define-pmacro (label16-null) (f-label16-null 0)) 3362 1.1 christos (define-pmacro (misc-null-1) (f-misc-null-1 0)) 3363 1.1 christos (define-pmacro (misc-null-2) (f-misc-null-2 0)) 3364 1.1 christos (define-pmacro (misc-null-3) (f-misc-null-3 0)) 3365 1.1 christos (define-pmacro (misc-null-4) (f-misc-null-4 0)) 3366 1.1 christos (define-pmacro (misc-null-5) (f-misc-null-5 0)) 3367 1.1 christos (define-pmacro (misc-null-6) (f-misc-null-6 0)) 3368 1.1 christos (define-pmacro (misc-null-7) (f-misc-null-7 0)) 3369 1.1 christos (define-pmacro (misc-null-8) (f-misc-null-8 0)) 3370 1.1 christos (define-pmacro (misc-null-9) (f-misc-null-9 0)) 3371 1.1 christos (define-pmacro (misc-null-10) (f-misc-null-10 0)) 3372 1.1 christos (define-pmacro (misc-null-11) (f-misc-null-11 0)) 3373 1.1 christos 3374 1.1 christos (define-pmacro (LRA-null) (f-LRA-null 0)) 3375 1.1 christos (define-pmacro (TLBPR-null) (f-TLBPR-null 0)) 3376 1.1 christos 3377 1.1 christos (define-pmacro (LI-on) (f-LI-on 1)) 3378 1.1 christos (define-pmacro (LI-off) (f-LI-off 0)) 3379 1.1 christos 3381 1.1 christos ; Instruction definitions. 3382 1.1 christos ; 3383 1.1 christos ; Notes: 3384 1.1 christos ; - dni is short for "define-normal-instruction" 3385 1.1 christos ; - Macros are used to represent each insn format. These should be used as much 3386 1.1 christos ; as possible unless an insn has exceptional behaviour 3387 1.1 christos ; 3388 1.1 christos 3389 1.1 christos ; Commonly used Macros 3390 1.1 christos ; 3391 1.1 christos ; Specific registers 3392 1.1 christos ; 3393 1.1 christos 3394 1.1 christos ; Integer condition code manipulation 3395 1.1 christos ; 3396 1.1 christos (define-pmacro (set-z-and-n icc x) 3397 1.1 christos (if (eq x 0) 3398 1.1 christos (set icc (or (and icc #x7) #x4)) 3399 1.1 christos (if (lt x 0) 3400 1.1 christos (set icc (or (and icc #xb) #x8)) 3401 1.1 christos (set icc (and icc #x3)))) 3402 1.1 christos ) 3403 1.1 christos 3404 1.1 christos (define-pmacro (set-n icc val) 3405 1.1 christos (if (eq val 0) 3406 1.1 christos (set icc (and icc #x7)) 3407 1.1 christos (set icc (or icc #x8))) 3408 1.1 christos ) 3409 1.1 christos 3410 1.1 christos (define-pmacro (set-z icc val) 3411 1.1 christos (if (eq val 0) 3412 1.1 christos (set icc (and icc #xb)) 3413 1.1 christos (set icc (or icc #x4))) 3414 1.1 christos ) 3415 1.1 christos 3416 1.1 christos (define-pmacro (set-v icc val) 3417 1.1 christos (if (eq val 0) 3418 1.1 christos (set icc (and icc #xd)) 3419 1.1 christos (set icc (or icc #x2))) 3420 1.1 christos ) 3421 1.1 christos 3422 1.1 christos (define-pmacro (set-c icc val) 3423 1.1 christos (if (eq val 0) 3424 1.1 christos (set icc (and icc #xe)) 3425 1.1 christos (set icc (or icc #x1))) 3426 1.1 christos ) 3427 1.1 christos 3428 1.1 christos (define-pmacro (nbit icc) 3429 1.1 christos (trunc BI (srl (and icc #x8) 3)) 3430 1.1 christos ) 3431 1.1 christos 3432 1.1 christos (define-pmacro (zbit icc) 3433 1.1 christos (trunc BI (srl (and icc #x4) 2)) 3434 1.1 christos ) 3435 1.1 christos 3436 1.1 christos (define-pmacro (vbit icc) 3437 1.1 christos (trunc BI (srl (and icc #x2) 1)) 3438 1.1 christos ) 3439 1.1 christos 3440 1.1 christos (define-pmacro (cbit icc) 3441 1.1 christos (trunc BI (and icc #x1)) 3442 1.1 christos ) 3443 1.1 christos 3444 1.1 christos (define-pmacro (ebit icc) 3445 1.1 christos (trunc BI (srl (and icc #x8) 3)) 3446 1.1 christos ) 3447 1.1 christos 3448 1.1 christos (define-pmacro (lbit icc) 3449 1.1 christos (trunc BI (srl (and icc #x4) 2)) 3450 1.1 christos ) 3451 1.1 christos 3452 1.1 christos (define-pmacro (gbit icc) 3453 1.1 christos (trunc BI (srl (and icc #x2) 1)) 3454 1.1 christos ) 3455 1.1 christos 3456 1.1 christos (define-pmacro (ubit icc) 3457 1.1 christos (trunc BI (and icc #x1)) 3458 1.1 christos ) 3459 1.1 christos 3460 1.1 christos ; FRV insns 3461 1.1 christos ; 3462 1.1 christos ; 3463 1.1 christos ; Format: INT, Logic, Shift r-r 3464 1.1 christos ; 3465 1.1 christos (define-pmacro (int-logic-r-r name operation op ope comment) 3466 1.1 christos (dni name 3467 1.1 christos (comment) 3468 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 3469 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 3470 1.1 christos (.str name "$pack $GRi,$GRj,$GRk") 3471 1.1 christos (+ pack GRk op GRi (ICCi_1-null) ope GRj) 3472 1.1 christos (set GRk (operation GRi GRj)) 3473 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 3474 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 3475 1.1 christos ) 3476 1.1 christos ) 3477 1.1 christos 3478 1.1 christos (int-logic-r-r add add OP_00 OPE2_00 "add reg/reg") 3479 1.1 christos (int-logic-r-r sub sub OP_00 OPE2_04 "sub reg/reg") 3480 1.1 christos (int-logic-r-r and and OP_01 OPE2_00 "and reg/reg") 3481 1.1 christos (int-logic-r-r or or OP_01 OPE2_02 "or reg/reg") 3482 1.1 christos (int-logic-r-r xor xor OP_01 OPE2_04 "xor reg/reg") 3483 1.1 christos 3484 1.1 christos (dni not 3485 1.1 christos ("not") 3486 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 3487 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 3488 1.1 christos ("not$pack $GRj,$GRk") 3489 1.1 christos (+ pack GRk OP_01 (rs-null) (ICCi_1-null) OPE2_06 GRj) 3490 1.1 christos (set GRk (inv GRj)) 3491 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 3492 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 3493 1.1 christos ) 3494 1.1 christos 3495 1.1 christos (dni sdiv 3496 1.1 christos "signed division" 3497 1.1 christos ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR550-MAJOR I-2) 3498 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 3499 1.1 christos "sdiv$pack $GRi,$GRj,$GRk" 3500 1.1 christos (+ pack GRk OP_00 GRi (ICCi_1-null) OPE2_0E GRj) 3501 1.1 christos (sequence () 3502 1.1 christos (c-call VOID "@cpu@_signed_integer_divide" 3503 1.1 christos GRi GRj (index-of GRk) 0) 3504 1.1 christos (clobber GRk)) 3505 1.1 christos ((fr400 (unit u-idiv)) (fr450 (unit u-idiv)) 3506 1.1 christos (fr500 (unit u-idiv)) (fr550 (unit u-idiv))) 3507 1.1 christos ) 3508 1.1 christos 3509 1.1 christos (dni nsdiv 3510 1.1 christos "non excepting signed division" 3511 1.1 christos ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR550-MAJOR I-2) NON-EXCEPTING 3512 1.1 christos (MACH simple,tomcat,fr500,fr550,frv)) 3513 1.1 christos "nsdiv$pack $GRi,$GRj,$GRk" 3514 1.1 christos (+ pack GRk OP_01 GRi (ICCi_1-null) OPE2_0E GRj) 3515 1.1 christos (sequence () 3516 1.1 christos (c-call VOID "@cpu@_signed_integer_divide" 3517 1.1 christos GRi GRj (index-of GRk) 1) 3518 1.1 christos (clobber GRk)) 3519 1.1 christos ((fr500 (unit u-idiv)) (fr550 (unit u-idiv))) 3520 1.1 christos ) 3521 1.1 christos 3522 1.1 christos (dni udiv 3523 1.1 christos "unsigned division reg/reg" 3524 1.1 christos ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR550-MAJOR I-2) 3525 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 3526 1.1 christos "udiv$pack $GRi,$GRj,$GRk" 3527 1.1 christos (+ pack GRk OP_00 GRi (ICCi_1-null) OPE2_0F GRj) 3528 1.1 christos (sequence () 3529 1.1 christos (c-call VOID "@cpu@_unsigned_integer_divide" 3530 1.1 christos GRi GRj (index-of GRk) 0) 3531 1.1 christos (clobber GRk)) 3532 1.1 christos ((fr400 (unit u-idiv)) (fr450 (unit u-idiv)) 3533 1.1 christos (fr500 (unit u-idiv)) (fr550 (unit u-idiv))) 3534 1.1 christos ) 3535 1.1 christos 3536 1.1 christos (dni nudiv 3537 1.1 christos "non excepting unsigned division" 3538 1.1 christos ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR550-MAJOR I-2) NON-EXCEPTING 3539 1.1 christos (MACH simple,tomcat,fr500,fr550,frv)) 3540 1.1 christos "nudiv$pack $GRi,$GRj,$GRk" 3541 1.1 christos (+ pack GRk OP_01 GRi (ICCi_1-null) OPE2_0F GRj) 3542 1.1 christos (sequence () 3543 1.1 christos (c-call VOID "@cpu@_unsigned_integer_divide" 3544 1.1 christos GRi GRj (index-of GRk) 1) 3545 1.1 christos (clobber GRk)) 3546 1.1 christos ((fr500 (unit u-idiv)) (fr550 (unit u-idiv))) 3547 1.1 christos ) 3548 1.1 christos 3549 1.1 christos ; Multiplication 3550 1.1 christos ; 3551 1.1 christos (define-pmacro (multiply-r-r name signop op ope comment) 3552 1.1 christos (dni name 3553 1.1 christos (comment) 3554 1.1 christos ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR550-MAJOR I-2) 3555 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 3556 1.1 christos (.str name "$pack $GRi,$GRj,$GRdoublek") 3557 1.1 christos (+ pack GRdoublek op GRi (ICCi_1-null) ope GRj) 3558 1.1 christos (set GRdoublek (mul DI (signop DI GRi) (signop DI GRj))) 3559 1.1 christos ((fr400 (unit u-imul)) (fr450 (unit u-imul)) 3560 1.1 christos (fr500 (unit u-imul)) (fr550 (unit u-imul))) 3561 1.1 christos ) 3562 1.1 christos ) 3563 1.1 christos 3564 1.1 christos (multiply-r-r smul ext OP_00 OPE2_08 "signed multiply reg/reg") 3565 1.1 christos (multiply-r-r umul zext OP_00 OPE2_0A "unsigned multiply reg/reg") 3566 1.1 christos 3567 1.1 christos ; Multiplication with integer accumulator IACC 3568 1.1 christos ; 3569 1.1 christos 3570 1.1 christos (define-pmacro (iacc-set value) 3571 1.1 christos (set (reg h-iacc0 0) value)) 3572 1.1 christos 3573 1.1 christos (define-pmacro (iacc-add value) 3574 1.1 christos (set (reg h-iacc0 0) 3575 1.1 christos (cond DI 3576 1.1 christos ((andif (andif (gt value 0) (gt (reg h-iacc0 0) 0)) 3577 1.1 christos (lt (sub DI #x7fffffffffffffff value) (reg h-iacc0 0))) 3578 1.1 christos ; Positive overflow 3579 1.1 christos (const DI #x7fffffffffffffff)) 3580 1.1 christos ((andif (andif (lt value 0) (lt (reg h-iacc0 0) 0)) 3581 1.1 christos (gt (sub DI #x8000000000000000 value) (reg h-iacc0 0))) 3582 1.1 christos ; Negative overflow 3583 1.1 christos (const DI #x8000000000000000)) 3584 1.1 christos (else 3585 1.1 christos (add DI (reg h-iacc0 0) value)))) 3586 1.1 christos ) 3587 1.1 christos 3588 1.1 christos (define-pmacro (iacc-sub value) 3589 1.1 christos (set (reg h-iacc0 0) 3590 1.1 christos (cond DI 3591 1.1 christos ((andif (andif (lt value 0) (gt (reg h-iacc0 0) 0)) 3592 1.1 christos (lt (add DI #x7fffffffffffffff value) (reg h-iacc0 0))) 3593 1.1 christos ; Positive overflow 3594 1.1 christos (const DI #x7fffffffffffffff)) 3595 1.1 christos ((andif (andif (gt value 0) (lt (reg h-iacc0 0) 0)) 3596 1.1 christos (gt (add DI #x8000000000000000 value) (reg h-iacc0 0))) 3597 1.1 christos ; Negative overflow 3598 1.1 christos (const DI #x8000000000000000)) 3599 1.1 christos (else 3600 1.1 christos (sub DI (reg h-iacc0 0) value)))) 3601 1.1 christos ) 3602 1.1 christos 3603 1.1 christos (define-pmacro (iacc-multiply-r-r name operation op ope comment) 3604 1.1 christos (dni name 3605 1.1 christos (comment) 3606 1.1 christos ((UNIT IACC) (MACH fr400,fr450) 3607 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1) AUDIO) 3608 1.1 christos (.str name "$pack $GRi,$GRj") 3609 1.1 christos (+ pack (rd-null) op GRi ope GRj) 3610 1.1 christos ((.sym iacc- operation) (mul DI (ext DI GRi) (ext DI GRj))) 3611 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer))) 3612 1.1 christos ) 3613 1.1 christos ) 3614 1.1 christos 3615 1.1 christos (iacc-multiply-r-r smu set OP_46 OPE1_05 "Signed multiply reg/reg/iacc") 3616 1.1 christos (iacc-multiply-r-r smass add OP_46 OPE1_06 "Signed multiply/add reg/reg/iacc") 3617 1.1 christos (iacc-multiply-r-r smsss sub OP_46 OPE1_07 "Signed multiply/sub reg/reg/iacc") 3618 1.1 christos 3619 1.1 christos (define-pmacro (int-shift-r-r name op ope comment) 3620 1.1 christos (dni name 3621 1.1 christos (comment) 3622 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 3623 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 3624 1.1 christos (.str name "$pack $GRi,$GRj,$GRk") 3625 1.1 christos (+ pack GRk op GRi (ICCi_1-null) ope GRj) 3626 1.1 christos (set GRk (name GRi (and GRj #x1f))) 3627 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 3628 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 3629 1.1 christos ) 3630 1.1 christos ) 3631 1.1 christos 3632 1.1 christos (int-shift-r-r sll OP_01 OPE2_08 "shift left logical reg/reg") 3633 1.1 christos (int-shift-r-r srl OP_01 OPE2_0A "shift right logical reg/reg") 3634 1.1 christos (int-shift-r-r sra OP_01 OPE2_0C "shift right arith reg/reg") 3635 1.1 christos 3636 1.1 christos (dni slass 3637 1.1 christos "shift left arith reg/reg with saturation" 3638 1.1 christos ((UNIT IALL) (MACH fr400,fr450) 3639 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1) AUDIO) 3640 1.1 christos "slass$pack $GRi,$GRj,$GRk" 3641 1.1 christos (+ pack GRk OP_46 GRi OPE1_02 GRj) 3642 1.1 christos (set GRk (c-call SI "@cpu@_shift_left_arith_saturate" GRi GRj)) 3643 1.1 christos () 3644 1.1 christos ) 3645 1.1 christos 3646 1.1 christos (dni scutss 3647 1.1 christos "Integer accumulator cut with saturation" 3648 1.1 christos ((UNIT I0) (MACH fr400,fr450) 3649 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1) AUDIO) 3650 1.1 christos "scutss$pack $GRj,$GRk" 3651 1.1 christos (+ pack GRk OP_46 (rs-null) OPE1_04 GRj) 3652 1.1 christos (set GRk (c-call SI "@cpu@_iacc_cut" (reg h-iacc0 0) GRj)) 3653 1.1 christos () 3654 1.1 christos ) 3655 1.1 christos 3656 1.1 christos (define-pmacro (scan-semantics arg1 arg2 targ) 3657 1.1 christos (sequence ((WI tmp1) (WI tmp2)) 3658 1.1 christos (set tmp1 arg1) 3659 1.1 christos (set tmp2 (sra arg2 1)) 3660 1.1 christos (set targ (c-call WI "@cpu@_scan_result" (xor tmp1 tmp2)))) 3661 1.1 christos ) 3662 1.1 christos 3663 1.1 christos (dni scan 3664 1.1 christos "scan" 3665 1.1 christos ((UNIT SCAN) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 3666 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 3667 1.1 christos "scan$pack $GRi,$GRj,$GRk" 3668 1.1 christos (+ pack GRk OP_0B GRi (ICCi_1-null) OPE2_00 GRj) 3669 1.1 christos (scan-semantics GRi GRj GRk) 3670 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 3671 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 3672 1.1 christos ) 3673 1.1 christos 3674 1.1 christos ; Format: conditional INT, Logic, Shift r-r 3675 1.1 christos ; 3676 1.1 christos (define-pmacro (conditional-int-logic name operation op ope comment) 3677 1.1 christos (dni name 3678 1.1 christos (comment) 3679 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 3680 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1) CONDITIONAL) 3681 1.1 christos (.str name "$pack $GRi,$GRj,$GRk,$CCi,$cond") 3682 1.1 christos (+ pack GRk op GRi CCi cond ope GRj) 3683 1.1 christos (if (eq CCi (or cond 2)) 3684 1.1 christos (set GRk (operation GRi GRj))) 3685 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 3686 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 3687 1.1 christos ) 3688 1.1 christos ) 3689 1.1 christos 3690 1.1 christos (conditional-int-logic cadd add OP_58 OPE4_0 "conditional add") 3691 1.1 christos (conditional-int-logic csub sub OP_58 OPE4_1 "conditional sub") 3692 1.1 christos (conditional-int-logic cand and OP_5A OPE4_0 "conditional and") 3693 1.1 christos (conditional-int-logic cor or OP_5A OPE4_1 "conditional or") 3694 1.1 christos (conditional-int-logic cxor xor OP_5A OPE4_2 "conditional xor") 3695 1.1 christos 3696 1.1 christos (dni cnot 3697 1.1 christos "conditional not" 3698 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 3699 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1) CONDITIONAL) 3700 1.1 christos "cnot$pack $GRj,$GRk,$CCi,$cond" 3701 1.1 christos (+ pack GRk OP_5A (rs-null) CCi cond OPE4_3 GRj) 3702 1.1 christos (if (eq CCi (or cond 2)) 3703 1.1 christos (set GRk (inv GRj))) 3704 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 3705 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 3706 1.1 christos ) 3707 1.1 christos 3708 1.1 christos (dni csmul 3709 1.1 christos "conditional signed multiply" 3710 1.1 christos ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR550-MAJOR I-2) 3711 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1) CONDITIONAL) 3712 1.1 christos "csmul$pack $GRi,$GRj,$GRdoublek,$CCi,$cond" 3713 1.1 christos (+ pack GRdoublek OP_58 GRi CCi cond OPE4_2 GRj) 3714 1.1 christos (if (eq CCi (or cond 2)) 3715 1.1 christos (set GRdoublek (mul DI (ext DI GRi) (ext DI GRj)))) 3716 1.1 christos ((fr400 (unit u-imul)) (fr450 (unit u-imul)) 3717 1.1 christos (fr500 (unit u-imul)) (fr550 (unit u-imul))) 3718 1.1 christos ) 3719 1.1 christos 3720 1.1 christos (dni csdiv 3721 1.1 christos "conditional signed division" 3722 1.1 christos ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR550-MAJOR I-2) 3723 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1) CONDITIONAL) 3724 1.1 christos "csdiv$pack $GRi,$GRj,$GRk,$CCi,$cond" 3725 1.1 christos (+ pack GRk OP_58 GRi CCi cond OPE4_3 GRj) 3726 1.1 christos (if (eq CCi (or cond 2)) 3727 1.1 christos (sequence () 3728 1.1 christos (c-call VOID "@cpu@_signed_integer_divide" 3729 1.1 christos GRi GRj (index-of GRk) 0) 3730 1.1 christos (clobber GRk))) 3731 1.1 christos ((fr400 (unit u-idiv)) (fr450 (unit u-idiv)) 3732 1.1 christos (fr500 (unit u-idiv)) (fr550 (unit u-idiv))) 3733 1.1 christos ) 3734 1.1 christos 3735 1.1 christos (dni cudiv 3736 1.1 christos "conditional unsigned division" 3737 1.1 christos ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR550-MAJOR I-2) 3738 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1) CONDITIONAL) 3739 1.1 christos "cudiv$pack $GRi,$GRj,$GRk,$CCi,$cond" 3740 1.1 christos (+ pack GRk OP_59 GRi CCi cond OPE4_3 GRj) 3741 1.1 christos (if (eq CCi (or cond 2)) 3742 1.1 christos (sequence () 3743 1.1 christos (c-call VOID "@cpu@_unsigned_integer_divide" 3744 1.1 christos GRi GRj (index-of GRk) 0) 3745 1.1 christos (clobber GRk))) 3746 1.1 christos ((fr400 (unit u-idiv)) (fr450 (unit u-idiv)) 3747 1.1 christos (fr500 (unit u-idiv)) (fr550 (unit u-idiv))) 3748 1.1 christos ) 3749 1.1 christos 3750 1.1 christos (define-pmacro (conditional-shift name operation op ope comment) 3751 1.1 christos (dni name 3752 1.1 christos (comment) 3753 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 3754 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1) CONDITIONAL) 3755 1.1 christos (.str name "$pack $GRi,$GRj,$GRk,$CCi,$cond") 3756 1.1 christos (+ pack GRk op GRi CCi cond ope GRj) 3757 1.1 christos (if (eq CCi (or cond 2)) 3758 1.1 christos (set GRk (operation GRi (and GRj #x1f)))) 3759 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 3760 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 3761 1.1 christos ) 3762 1.1 christos ) 3763 1.1 christos 3764 1.1 christos (conditional-shift csll sll OP_5C OPE4_0 "conditional shift left logical") 3765 1.1 christos (conditional-shift csrl srl OP_5C OPE4_1 "conditional shift right logical") 3766 1.1 christos (conditional-shift csra sra OP_5C OPE4_2 "conditional shift right arith") 3767 1.1 christos 3768 1.1 christos (dni cscan 3769 1.1 christos "conditional scan" 3770 1.1 christos ((UNIT SCAN) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 3771 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1) CONDITIONAL) 3772 1.1 christos "cscan$pack $GRi,$GRj,$GRk,$CCi,$cond" 3773 1.1 christos (+ pack GRk OP_65 GRi CCi cond OPE4_3 GRj) 3774 1.1 christos (if (eq CCi (or cond 2)) 3775 1.1 christos (scan-semantics GRi GRj GRk)) 3776 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 3777 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 3778 1.1 christos ) 3779 1.1 christos 3780 1.1 christos ; Format: INT, Logic, Shift, cc r-r 3781 1.1 christos ; 3782 1.1 christos (define-pmacro (int-arith-cc-semantics operation icc) 3783 1.1 christos (sequence ((BI tmp) (QI cc) (SI result)) 3784 1.1 christos (set cc icc) 3785 1.1 christos (set tmp ((.sym operation -oflag) GRi GRj (const 0))) 3786 1.1 christos (set-v cc tmp) 3787 1.1 christos (set tmp ((.sym operation -cflag) GRi GRj (const 0))) 3788 1.1 christos (set-c cc tmp) 3789 1.1 christos (set result (operation GRi GRj)) 3790 1.1 christos (set-z-and-n cc result) 3791 1.1 christos (set GRk result) 3792 1.1 christos (set icc cc)) 3793 1.1 christos ) 3794 1.1 christos 3795 1.1 christos (define-pmacro (int-arith-cc-r-r name operation op ope comment) 3796 1.1 christos (dni name 3797 1.1 christos (comment) 3798 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 3799 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 3800 1.1 christos (.str name "$pack $GRi,$GRj,$GRk,$ICCi_1") 3801 1.1 christos (+ pack GRk op GRi ICCi_1 ope GRj) 3802 1.1 christos (int-arith-cc-semantics operation ICCi_1) 3803 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 3804 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 3805 1.1 christos ) 3806 1.1 christos ) 3807 1.1 christos 3808 1.1 christos (int-arith-cc-r-r addcc add OP_00 OPE2_01 "add reg/reg, set icc") 3809 1.1 christos (int-arith-cc-r-r subcc sub OP_00 OPE2_05 "sub reg/reg, set icc") 3810 1.1 christos 3811 1.1 christos (define-pmacro (int-logic-cc-semantics op icc) 3812 1.1 christos (sequence ((SI tmp)) 3813 1.1 christos (set tmp (op GRi GRj)) 3814 1.1 christos (set GRk tmp) 3815 1.1 christos (set-z-and-n icc tmp)) 3816 1.1 christos ) 3817 1.1 christos 3818 1.1 christos (define-pmacro (int-logic-cc-r-r name op ope comment) 3819 1.1 christos (dni (.sym name cc) 3820 1.1 christos (comment) 3821 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 3822 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 3823 1.1 christos (.str (.sym name cc) "$pack $GRi,$GRj,$GRk,$ICCi_1") 3824 1.1 christos (+ pack GRk op GRi ICCi_1 ope GRj) 3825 1.1 christos (int-logic-cc-semantics name ICCi_1) 3826 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 3827 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 3828 1.1 christos ) 3829 1.1 christos ) 3830 1.1 christos 3831 1.1 christos (int-logic-cc-r-r and OP_01 OPE2_01 "and reg/reg, set icc") 3832 1.1 christos (int-logic-cc-r-r or OP_01 OPE2_03 "or reg/reg, set icc") 3833 1.1 christos (int-logic-cc-r-r xor OP_01 OPE2_05 "xor reg/reg, set icc") 3834 1.1 christos 3835 1.1 christos (define-pmacro (int-shift-cc-semantics op l-r icc) 3836 1.1 christos (sequence ((WI shift) (SI tmp) (QI cc)) 3837 1.1 christos (set shift (and GRj #x1f)) 3838 1.1 christos (set cc (c-call QI (.str "@cpu@_set_icc_for_shift_" l-r) 3839 1.1 christos GRi shift icc)) 3840 1.1 christos (set tmp (op GRi shift)) 3841 1.1 christos (set GRk tmp) 3842 1.1 christos (set-z-and-n cc tmp) 3843 1.1 christos (set icc cc)) 3844 1.1 christos ) 3845 1.1 christos 3846 1.1 christos (define-pmacro (int-shift-cc-r-r name l-r op ope comment) 3847 1.1 christos (dni (.sym name cc) 3848 1.1 christos (comment) 3849 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 3850 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 3851 1.1 christos (.str (.sym name cc) "$pack $GRi,$GRj,$GRk,$ICCi_1") 3852 1.1 christos (+ pack GRk op GRi ICCi_1 ope GRj) 3853 1.1 christos (int-shift-cc-semantics name l-r ICCi_1) 3854 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 3855 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 3856 1.1 christos ) 3857 1.1 christos ) 3858 1.1 christos 3859 1.1 christos (int-shift-cc-r-r sll left OP_01 OPE2_09 "shift left logical reg/reg,set icc") 3860 1.1 christos (int-shift-cc-r-r srl right OP_01 OPE2_0B "shift right logical reg/reg,set icc") 3861 1.1 christos (int-shift-cc-r-r sra right OP_01 OPE2_0D "shift right arith reg/reg,set icc") 3862 1.1 christos 3863 1.1 christos (define-pmacro (multiply-cc-semantics signop arg1 arg2 targ icc) 3864 1.1 christos (sequence ((DI tmp) (QI cc)) 3865 1.1 christos (set cc icc) 3866 1.1 christos (set tmp (mul DI (signop DI arg1) (signop DI arg2))) 3867 1.1 christos (set-n cc (srl DI tmp 63)) 3868 1.1 christos (set-z cc (eq tmp 0)) 3869 1.1 christos (set targ tmp) 3870 1.1 christos (set icc cc)) 3871 1.1 christos ) 3872 1.1 christos 3873 1.1 christos (define-pmacro (multiply-cc-r-r name signop op ope comment) 3874 1.1 christos (dni name 3875 1.1 christos (comment) 3876 1.1 christos ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR550-MAJOR I-2) 3877 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 3878 1.1 christos (.str name "$pack $GRi,$GRj,$GRdoublek,$ICCi_1") 3879 1.1 christos (+ pack GRdoublek op GRi ICCi_1 ope GRj) 3880 1.1 christos (multiply-cc-semantics signop GRi GRj GRdoublek ICCi_1) 3881 1.1 christos ((fr400 (unit u-imul)) (fr450 (unit u-imul)) 3882 1.1 christos (fr500 (unit u-imul)) (fr550 (unit u-imul))) 3883 1.1 christos ) 3884 1.1 christos ) 3885 1.1 christos 3886 1.1 christos (multiply-cc-r-r smulcc ext OP_00 OPE2_09 "signed multiply reg/reg") 3887 1.1 christos (multiply-cc-r-r umulcc zext OP_00 OPE2_0B "unsigned multiply reg/reg") 3888 1.1 christos 3889 1.1 christos 3890 1.1 christos ; Format: conditional INT, Logic, Shift, cc r-r 3891 1.1 christos ; 3892 1.1 christos (define-pmacro (conditional-int-arith-cc name operation op ope comment) 3893 1.1 christos (dni name 3894 1.1 christos (comment) 3895 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 3896 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1) CONDITIONAL) 3897 1.1 christos (.str name "$pack $GRi,$GRj,$GRk,$CCi,$cond") 3898 1.1 christos (+ pack GRk op GRi CCi cond ope GRj) 3899 1.1 christos (if (eq CCi (or cond 2)) 3900 1.1 christos (int-arith-cc-semantics operation 3901 1.1 christos (reg h-iccr (and (index-of CCi) 3)))) 3902 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 3903 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 3904 1.1 christos ) 3905 1.1 christos ) 3906 1.1 christos 3907 1.1 christos (conditional-int-arith-cc caddcc add OP_59 OPE4_0 "add, set icc") 3908 1.1 christos (conditional-int-arith-cc csubcc sub OP_59 OPE4_1 "sub, set icc") 3909 1.1 christos 3910 1.1 christos (dni csmulcc 3911 1.1 christos "conditional signed multiply and set condition code" 3912 1.1 christos ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR550-MAJOR I-2) 3913 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1) CONDITIONAL) 3914 1.1 christos "csmulcc$pack $GRi,$GRj,$GRdoublek,$CCi,$cond" 3915 1.1 christos (+ pack GRdoublek OP_59 GRi CCi cond OPE4_2 GRj) 3916 1.1 christos (if (eq CCi (or cond 2)) 3917 1.1 christos (multiply-cc-semantics ext GRi GRj GRdoublek 3918 1.1 christos (reg h-iccr (and (index-of CCi) 3)))) 3919 1.1 christos ((fr400 (unit u-imul)) (fr450 (unit u-imul)) 3920 1.1 christos (fr500 (unit u-imul)) (fr550 (unit u-imul))) 3921 1.1 christos ) 3922 1.1 christos 3923 1.1 christos (define-pmacro (conditional-int-logic-cc name operation op ope comment) 3924 1.1 christos (dni name 3925 1.1 christos (comment) 3926 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 3927 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1) CONDITIONAL) 3928 1.1 christos (.str name "$pack $GRi,$GRj,$GRk,$CCi,$cond") 3929 1.1 christos (+ pack GRk op GRi CCi cond ope GRj) 3930 1.1 christos (if (eq CCi (or cond 2)) 3931 1.1 christos (int-logic-cc-semantics operation 3932 1.1 christos (reg h-iccr (and (index-of CCi) 3)))) 3933 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 3934 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 3935 1.1 christos ) 3936 1.1 christos ) 3937 1.1 christos 3938 1.1 christos (conditional-int-logic-cc candcc and OP_5B OPE4_0 "conditional and, set icc") 3939 1.1 christos (conditional-int-logic-cc corcc or OP_5B OPE4_1 "conditional or , set icc") 3940 1.1 christos (conditional-int-logic-cc cxorcc xor OP_5B OPE4_2 "conditional xor, set icc") 3941 1.1 christos 3942 1.1 christos (define-pmacro (conditional-int-shift-cc name l-r op ope comment) 3943 1.1 christos (dni (.sym c name cc) 3944 1.1 christos (comment) 3945 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 3946 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1) CONDITIONAL) 3947 1.1 christos (.str (.sym c name cc) "$pack $GRi,$GRj,$GRk,$CCi,$cond") 3948 1.1 christos (+ pack GRk op GRi CCi cond ope GRj) 3949 1.1 christos (if (eq CCi (or cond 2)) 3950 1.1 christos (int-shift-cc-semantics name l-r 3951 1.1 christos (reg h-iccr (and (index-of CCi) 3)))) 3952 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 3953 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 3954 1.1 christos ) 3955 1.1 christos ) 3956 1.1 christos 3957 1.1 christos (conditional-int-shift-cc sll left OP_5D OPE4_0 "shift left logical, set icc") 3958 1.1 christos (conditional-int-shift-cc srl right OP_5D OPE4_1 "shift right logical, set icc") 3959 1.1 christos (conditional-int-shift-cc sra right OP_5D OPE4_2 "shift right arith , set icc") 3960 1.1 christos 3961 1.1 christos ; Add and subtract with carry 3962 1.1 christos ; 3963 1.1 christos (define-pmacro (int-arith-x-r-r name operation op ope comment) 3964 1.1 christos (dni name 3965 1.1 christos (comment) 3966 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 3967 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 3968 1.1 christos (.str name "$pack $GRi,$GRj,$GRk,$ICCi_1") 3969 1.1 christos (+ pack GRk op GRi ICCi_1 ope GRj) 3970 1.1 christos (set GRk ((.sym operation c) GRi GRj (cbit ICCi_1))) 3971 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 3972 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 3973 1.1 christos ) 3974 1.1 christos ) 3975 1.1 christos 3976 1.1 christos (int-arith-x-r-r addx add OP_00 OPE2_02 "Add reg/reg, with carry") 3977 1.1 christos (int-arith-x-r-r subx sub OP_00 OPE2_06 "Sub reg/reg, with carry") 3978 1.1 christos 3979 1.1 christos (define-pmacro (int-arith-x-cc-r-r name operation op ope comment) 3980 1.1 christos (dni name 3981 1.1 christos (comment) 3982 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 3983 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 3984 1.1 christos (.str name "$pack $GRi,$GRj,$GRk,$ICCi_1") 3985 1.1 christos (+ pack GRk op GRi ICCi_1 ope GRj) 3986 1.1 christos (sequence ((WI tmp) (QI cc)) 3987 1.1 christos (set cc ICCi_1) 3988 1.1 christos (set tmp ((.sym operation c) GRi GRj (cbit cc))) 3989 1.1 christos (set-v cc ((.sym operation -oflag) GRi GRj (cbit cc))) 3990 1.1 christos (set-c cc ((.sym operation -cflag) GRi GRj (cbit cc))) 3991 1.1 christos (set-z-and-n cc tmp) 3992 1.1 christos (set GRk tmp) 3993 1.1 christos (set ICCi_1 cc)) 3994 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 3995 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 3996 1.1 christos ) 3997 1.1 christos ) 3998 1.1 christos 3999 1.1 christos (int-arith-x-cc-r-r addxcc add OP_00 OPE2_03 "Add reg/reg, use/set carry") 4000 1.1 christos (int-arith-x-cc-r-r subxcc sub OP_00 OPE2_07 "Sub reg/reg, use/set carry") 4001 1.1 christos ; Add and subtract with saturation 4002 1.1 christos ; 4003 1.1 christos (define-pmacro (int-arith-ss-r-r name operation op ope comment) 4004 1.1 christos (dni name 4005 1.1 christos (comment) 4006 1.1 christos ((UNIT IALL) (MACH fr400,fr450) 4007 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1) AUDIO) 4008 1.1 christos (.str name "$pack $GRi,$GRj,$GRk") 4009 1.1 christos (+ pack GRk op GRi ope GRj) 4010 1.1 christos (sequence () 4011 1.1 christos (set GRk (operation GRi GRj)) 4012 1.1 christos (if ((.sym operation -oflag) GRi GRj (const 0)) 4013 1.1 christos ; Overflow, saturate. 4014 1.1 christos ; Sign of result will be 4015 1.1 christos ; same as sign of first operand. 4016 1.1 christos (set GRk 4017 1.1 christos (cond SI 4018 1.1 christos ((gt GRi 0) (const #x7fffffff)) 4019 1.1 christos ((lt GRi 0) (const #x80000000)) 4020 1.1 christos (else (const 0))))) 4021 1.1 christos ) 4022 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer))) 4023 1.1 christos ) 4024 1.1 christos ) 4025 1.1 christos 4026 1.1 christos (int-arith-ss-r-r addss add OP_46 OPE1_00 "add reg/reg, with saturation") 4027 1.1 christos (int-arith-ss-r-r subss sub OP_46 OPE1_01 "sub reg/reg, with saturation") 4028 1.1 christos 4029 1.1 christos ; Format: INT, Logic, Shift r-simm 4030 1.1 christos ; 4031 1.1 christos (define-pmacro (int-logic-r-simm name operation op comment) 4032 1.1 christos (dni name 4033 1.1 christos (comment) 4034 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 4035 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 4036 1.1 christos (.str name "$pack $GRi,$s12,$GRk") 4037 1.1 christos (+ pack GRk op GRi s12) 4038 1.1 christos (set GRk (operation GRi s12)) 4039 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 4040 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 4041 1.1 christos ) 4042 1.1 christos ) 4043 1.1 christos 4044 1.1 christos (int-logic-r-simm addi add OP_10 "add reg/immed") 4045 1.1 christos (int-logic-r-simm subi sub OP_14 "sub reg/immed") 4046 1.1 christos (int-logic-r-simm andi and OP_20 "and reg/immed") 4047 1.1 christos (int-logic-r-simm ori or OP_22 "or reg/immed") 4048 1.1 christos (int-logic-r-simm xori xor OP_24 "xor reg/immed") 4049 1.1 christos 4050 1.1 christos (dni sdivi 4051 1.1 christos "signed division reg/immed" 4052 1.1 christos ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR550-MAJOR I-2) 4053 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 4054 1.1 christos "sdivi$pack $GRi,$s12,$GRk" 4055 1.1 christos (+ pack GRk OP_1E GRi s12) 4056 1.1 christos (sequence () 4057 1.1 christos (c-call VOID "@cpu@_signed_integer_divide" 4058 1.1 christos GRi s12 (index-of GRk) 0) 4059 1.1 christos (clobber GRk)) 4060 1.1 christos ((fr400 (unit u-idiv)) (fr450 (unit u-idiv)) 4061 1.1 christos (fr500 (unit u-idiv)) (fr550 (unit u-idiv))) 4062 1.1 christos ) 4063 1.1 christos 4064 1.1 christos (dni nsdivi 4065 1.1 christos "non excepting signed division reg/immed" 4066 1.1 christos ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR550-MAJOR I-2) NON-EXCEPTING 4067 1.1 christos (MACH simple,tomcat,fr500,fr550,frv)) 4068 1.1 christos "nsdivi$pack $GRi,$s12,$GRk" 4069 1.1 christos (+ pack GRk OP_2E GRi s12) 4070 1.1 christos (sequence () 4071 1.1 christos (c-call VOID "@cpu@_signed_integer_divide" 4072 1.1 christos GRi s12 (index-of GRk) 1) 4073 1.1 christos (clobber GRk)) 4074 1.1 christos ((fr500 (unit u-idiv)) (fr550 (unit u-idiv))) 4075 1.1 christos ) 4076 1.1 christos 4077 1.1 christos (dni udivi 4078 1.1 christos "unsigned division reg/immed" 4079 1.1 christos ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR550-MAJOR I-2) 4080 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 4081 1.1 christos "udivi$pack $GRi,$s12,$GRk" 4082 1.1 christos (+ pack GRk OP_1F GRi s12) 4083 1.1 christos (sequence () 4084 1.1 christos (c-call VOID "@cpu@_unsigned_integer_divide" 4085 1.1 christos GRi s12 (index-of GRk) 0) 4086 1.1 christos (clobber GRk)) 4087 1.1 christos ((fr400 (unit u-idiv)) (fr450 (unit u-idiv)) 4088 1.1 christos (fr500 (unit u-idiv)) (fr550 (unit u-idiv))) 4089 1.1 christos ) 4090 1.1 christos 4091 1.1 christos (dni nudivi 4092 1.1 christos "non excepting unsigned division reg/immed" 4093 1.1 christos ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR550-MAJOR I-2) NON-EXCEPTING 4094 1.1 christos (MACH simple,tomcat,fr500,fr550,frv)) 4095 1.1 christos "nudivi$pack $GRi,$s12,$GRk" 4096 1.1 christos (+ pack GRk OP_2F GRi s12) 4097 1.1 christos (sequence () 4098 1.1 christos (c-call VOID "@cpu@_unsigned_integer_divide" 4099 1.1 christos GRi s12 (index-of GRk) 1) 4100 1.1 christos (clobber GRk)) 4101 1.1 christos ((fr500 (unit u-idiv)) (fr550 (unit u-idiv))) 4102 1.1 christos ) 4103 1.1 christos 4104 1.1 christos (define-pmacro (multiply-r-simm name signop op comment) 4105 1.1 christos (dni name 4106 1.1 christos (comment) 4107 1.1 christos ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR550-MAJOR I-2) 4108 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 4109 1.1 christos (.str name "$pack $GRi,$s12,$GRdoublek") 4110 1.1 christos (+ pack GRdoublek op GRi s12) 4111 1.1 christos (set GRdoublek (mul DI (signop DI GRi) (signop DI s12))) 4112 1.1 christos ((fr400 (unit u-imul)) (fr450 (unit u-imul)) 4113 1.1 christos (fr500 (unit u-imul)) (fr550 (unit u-imul))) 4114 1.1 christos ) 4115 1.1 christos ) 4116 1.1 christos 4117 1.1 christos (multiply-r-simm smuli ext OP_18 "signed multiply reg/immed") 4118 1.1 christos (multiply-r-simm umuli zext OP_1A "unsigned multiply reg/immed") 4119 1.1 christos 4120 1.1 christos (define-pmacro (int-shift-r-simm name op comment) 4121 1.1 christos (dni (.sym name i) 4122 1.1 christos (comment) 4123 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 4124 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 4125 1.1 christos (.str (.sym name i) "$pack $GRi,$s12,$GRk") 4126 1.1 christos (+ pack GRk op GRi s12) 4127 1.1 christos (set GRk (name GRi (and s12 #x1f))) 4128 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 4129 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 4130 1.1 christos ) 4131 1.1 christos ) 4132 1.1 christos 4133 1.1 christos (int-shift-r-simm sll OP_28 "shift left logical reg/immed") 4134 1.1 christos (int-shift-r-simm srl OP_2A "shift right logical reg/immed") 4135 1.1 christos (int-shift-r-simm sra OP_2C "shift right arith reg/immed") 4136 1.1 christos 4137 1.1 christos (dni scani 4138 1.1 christos "scan immediate" 4139 1.1 christos ((UNIT SCAN) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 4140 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 4141 1.1 christos "scani$pack $GRi,$s12,$GRk" 4142 1.1 christos (+ pack GRk OP_47 GRi s12) 4143 1.1 christos (scan-semantics GRi s12 GRk) 4144 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 4145 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 4146 1.1 christos ) 4147 1.1 christos 4148 1.1 christos ; Format: INT, Logic, Shift cc r-simm 4149 1.1 christos ; 4150 1.1 christos (define-pmacro (int-arith-cc-r-simm name operation op comment) 4151 1.1 christos (dni name 4152 1.1 christos (comment) 4153 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 4154 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 4155 1.1 christos (.str name "$pack $GRi,$s10,$GRk,$ICCi_1") 4156 1.1 christos (+ pack GRk op GRi ICCi_1 s10) 4157 1.1 christos (sequence ((BI tmp) (QI cc) (SI result)) 4158 1.1 christos (set cc ICCi_1) 4159 1.1 christos (set tmp ((.sym operation -oflag) GRi s10 (const 0))) 4160 1.1 christos (set-v cc tmp) 4161 1.1 christos (set tmp ((.sym operation -cflag) GRi s10 (const 0))) 4162 1.1 christos (set-c cc tmp) 4163 1.1 christos (set result (operation GRi s10)) 4164 1.1 christos (set-z-and-n cc result) 4165 1.1 christos (set GRk result) 4166 1.1 christos (set ICCi_1 cc)) 4167 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 4168 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 4169 1.1 christos ) 4170 1.1 christos ) 4171 1.1 christos 4172 1.1 christos (int-arith-cc-r-simm addicc add OP_11 "add reg/immed, set icc") 4173 1.1 christos (int-arith-cc-r-simm subicc sub OP_15 "sub reg/immed, set icc") 4174 1.1 christos 4175 1.1 christos (define-pmacro (int-logic-cc-r-simm name op comment) 4176 1.1 christos (dni (.sym name icc) 4177 1.1 christos (comment) 4178 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 4179 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 4180 1.1 christos (.str (.sym name icc) "$pack $GRi,$s10,$GRk,$ICCi_1") 4181 1.1 christos (+ pack GRk op GRi ICCi_1 s10) 4182 1.1 christos (sequence ((SI tmp)) 4183 1.1 christos (set tmp (name GRi s10)) 4184 1.1 christos (set GRk tmp) 4185 1.1 christos (set-z-and-n ICCi_1 tmp)) 4186 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 4187 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 4188 1.1 christos ) 4189 1.1 christos ) 4190 1.1 christos 4191 1.1 christos (int-logic-cc-r-simm and OP_21 "and reg/immed, set icc") 4192 1.1 christos (int-logic-cc-r-simm or OP_23 "or reg/immed, set icc") 4193 1.1 christos (int-logic-cc-r-simm xor OP_25 "xor reg/immed, set icc") 4194 1.1 christos 4195 1.1 christos (define-pmacro (multiply-cc-r-simm name signop op comment) 4196 1.1 christos (dni name 4197 1.1 christos (comment) 4198 1.1 christos ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR550-MAJOR I-2) 4199 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 4200 1.1 christos (.str name "$pack $GRi,$s10,$GRdoublek,$ICCi_1") 4201 1.1 christos (+ pack GRdoublek op GRi ICCi_1 s10) 4202 1.1 christos (multiply-cc-semantics signop GRi s10 GRdoublek ICCi_1) 4203 1.1 christos ((fr400 (unit u-imul)) (fr450 (unit u-imul)) 4204 1.1 christos (fr500 (unit u-imul)) (fr550 (unit u-imul))) 4205 1.1 christos ) 4206 1.1 christos ) 4207 1.1 christos 4208 1.1 christos (multiply-cc-r-simm smulicc ext OP_19 "signed multiply reg/immed") 4209 1.1 christos (multiply-cc-r-simm umulicc zext OP_1B "unsigned multiply reg/immed") 4210 1.1 christos 4211 1.1 christos (define-pmacro (int-shift-cc-r-simm name l-r op comment) 4212 1.1 christos (dni (.sym name icc) 4213 1.1 christos (comment) 4214 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 4215 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 4216 1.1 christos (.str (.sym name icc) "$pack $GRi,$s10,$GRk,$ICCi_1") 4217 1.1 christos (+ pack GRk op GRi ICCi_1 s10) 4218 1.1 christos (sequence ((WI shift) (SI tmp) (QI cc)) 4219 1.1 christos (set shift (and s10 #x1f)) 4220 1.1 christos (set cc (c-call QI (.str "@cpu@_set_icc_for_shift_" l-r) 4221 1.1 christos GRi shift ICCi_1)) 4222 1.1 christos (set tmp (name GRi shift)) 4223 1.1 christos (set GRk tmp) 4224 1.1 christos (set-z-and-n cc tmp) 4225 1.1 christos (set ICCi_1 cc)) 4226 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 4227 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 4228 1.1 christos ) 4229 1.1 christos ) 4230 1.1 christos 4231 1.1 christos (int-shift-cc-r-simm sll left OP_29 "shift left logical reg/immed, set icc") 4232 1.1 christos (int-shift-cc-r-simm srl right OP_2B "shift right logical reg/immed, set icc") 4233 1.1 christos (int-shift-cc-r-simm sra right OP_2D "shift right arith reg/immed, set icc") 4234 1.1 christos 4235 1.1 christos (define-pmacro (int-arith-x-r-simm name operation op comment) 4236 1.1 christos (dni name 4237 1.1 christos (comment) 4238 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 4239 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 4240 1.1 christos (.str name "$pack $GRi,$s10,$GRk,$ICCi_1") 4241 1.1 christos (+ pack GRk op GRi ICCi_1 s10) 4242 1.1 christos (set GRk ((.sym operation c) GRi s10 (cbit ICCi_1))) 4243 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 4244 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 4245 1.1 christos ) 4246 1.1 christos ) 4247 1.1 christos 4248 1.1 christos (int-arith-x-r-simm addxi add OP_12 "Add reg/immed, with carry") 4249 1.1 christos (int-arith-x-r-simm subxi sub OP_16 "Sub reg/immed, with carry") 4250 1.1 christos 4251 1.1 christos (define-pmacro (int-arith-x-cc-r-simm name operation op comment) 4252 1.1 christos (dni name 4253 1.1 christos (comment) 4254 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 4255 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 4256 1.1 christos (.str name "$pack $GRi,$s10,$GRk,$ICCi_1") 4257 1.1 christos (+ pack GRk op GRi ICCi_1 s10) 4258 1.1 christos (sequence ((WI tmp) (QI cc)) 4259 1.1 christos (set cc ICCi_1) 4260 1.1 christos (set tmp ((.sym operation c) GRi s10 (cbit cc))) 4261 1.1 christos (set-v cc ((.sym operation -oflag) GRi s10 (cbit cc))) 4262 1.1 christos (set-c cc ((.sym operation -cflag) GRi s10 (cbit cc))) 4263 1.1 christos (set-z-and-n cc tmp) 4264 1.1 christos (set GRk tmp) 4265 1.1 christos (set ICCi_1 cc)) 4266 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 4267 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 4268 1.1 christos ) 4269 1.7 christos ) 4270 1.1 christos 4271 1.1 christos (int-arith-x-cc-r-simm addxicc add OP_13 "Add reg/immed, with carry") 4272 1.1 christos (int-arith-x-cc-r-simm subxicc sub OP_17 "Sub reg/immed, with carry") 4273 1.1 christos 4274 1.1 christos ; Byte compare insns 4275 1.1 christos 4276 1.1 christos (dni cmpb 4277 1.1 christos "Compare bytes" 4278 1.1 christos ((UNIT IALL) (MACH fr400,fr450,fr550) (FR550-MAJOR I-1) 4279 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 4280 1.1 christos "cmpb$pack $GRi,$GRj,$ICCi_1" 4281 1.1 christos (+ pack (GRk-null) OP_00 GRi ICCi_1 OPE2_0C GRj) 4282 1.1 christos (sequence ((QI cc)) 4283 1.1 christos (set cc 0) 4284 1.1 christos (set-n cc (eq (and GRi #xff000000) (and GRj #xff000000))) 4285 1.1 christos (set-z cc (eq (and GRi #x00ff0000) (and GRj #x00ff0000))) 4286 1.1 christos (set-v cc (eq (and GRi #x0000ff00) (and GRj #x0000ff00))) 4287 1.1 christos (set-c cc (eq (and GRi #x000000ff) (and GRj #x000000ff))) 4288 1.1 christos (set ICCi_1 cc)) 4289 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 4290 1.1 christos (fr550 (unit u-integer))) 4291 1.1 christos ) 4292 1.1 christos 4293 1.1 christos (dni cmpba 4294 1.1 christos "OR of Compare bytes" 4295 1.1 christos ((UNIT IALL) (MACH fr400,fr450,fr550) (FR550-MAJOR I-1) 4296 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 4297 1.1 christos "cmpba$pack $GRi,$GRj,$ICCi_1" 4298 1.1 christos (+ pack (GRk-null) OP_00 GRi ICCi_1 OPE2_0D GRj) 4299 1.1 christos (sequence ((QI cc)) 4300 1.1 christos (set cc 0) 4301 1.1 christos (set-c cc 4302 1.1 christos (orif (eq (and GRi #xff000000) (and GRj #xff000000)) 4303 1.1 christos (orif (eq (and GRi #x00ff0000) (and GRj #x00ff0000)) 4304 1.1 christos (orif (eq (and GRi #x0000ff00) 4305 1.1 christos (and GRj #x0000ff00)) 4306 1.1 christos (eq (and GRi #x000000ff) 4307 1.1 christos (and GRj #x000000ff)))))) 4308 1.1 christos (set ICCi_1 cc)) 4309 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 4310 1.1 christos (fr550 (unit u-integer))) 4311 1.1 christos ) 4312 1.1 christos 4313 1.1 christos ; Format: Load immediate 4314 1.1 christos ; 4315 1.1 christos (dni setlo 4316 1.1 christos "set low order bits" 4317 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 4318 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 4319 1.1 christos "setlo$pack $ulo16,$GRklo" 4320 1.1 christos (+ pack GRk OP_3D (misc-null-4) u16) 4321 1.1 christos (set GRklo u16) 4322 1.1 christos ((fr400 (unit u-set-hilo)) (fr450 (unit u-set-hilo)) 4323 1.1 christos (fr500 (unit u-set-hilo)) (fr550 (unit u-set-hilo))) 4324 1.1 christos ) 4325 1.1 christos 4326 1.1 christos (dni sethi 4327 1.1 christos "set high order bits" 4328 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 4329 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 4330 1.1 christos "sethi$pack $uhi16,$GRkhi" 4331 1.1 christos (+ pack GRkhi OP_3E (misc-null-4) u16) 4332 1.1 christos (set GRkhi u16) 4333 1.1 christos ((fr400 (unit u-set-hilo)) (fr450 (unit u-set-hilo)) 4334 1.1 christos (fr500 (unit u-set-hilo)) (fr550 (unit u-set-hilo))) 4335 1.1 christos ) 4336 1.1 christos 4337 1.1 christos (dni setlos 4338 1.1 christos "set low order bits and extend sign" 4339 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR550-MAJOR I-1) 4340 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 4341 1.1 christos "setlos$pack $slo16,$GRk" 4342 1.1 christos (+ pack GRk OP_3F (misc-null-4) s16) 4343 1.1 christos (set GRk s16) 4344 1.1 christos ((fr400 (unit u-integer)) (fr450 (unit u-integer)) 4345 1.1 christos (fr500 (unit u-integer)) (fr550 (unit u-integer))) 4346 1.1 christos ) 4347 1.1 christos 4348 1.1 christos (define-pmacro (load-gr-r name mode op ope comment ann) 4349 1.1 christos (dni name 4350 1.1 christos (comment) 4351 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) 4352 1.1 christos (FR400-MAJOR I-2) (FR450-MAJOR I-2)) 4353 1.1 christos (.str name "$pack " ann "($GRi,$GRj),$GRk") 4354 1.1 christos (+ pack GRk op GRi ope GRj) 4355 1.1 christos (set GRk (c-call mode (.str "@cpu@_read_mem_" mode) pc (add GRi GRj))) 4356 1.1 christos ((fr400 (unit u-gr-load)) (fr450 (unit u-gr-load)) 4357 1.1 christos (fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) 4358 1.1 christos ) 4359 1.1 christos ) 4360 1.1 christos 4361 1.1 christos (dann ldann "ld annotation" SI "ld_annotation" "at") 4362 1.1 christos 4363 1.1 christos (load-gr-r ldsb QI OP_02 OPE1_00 "Load signed byte" "@") 4364 1.1 christos (load-gr-r ldub UQI OP_02 OPE1_01 "Load unsigned byte" "@") 4365 1.1 christos (load-gr-r ldsh HI OP_02 OPE1_02 "Load signed half" "@") 4366 1.1 christos (load-gr-r lduh UHI OP_02 OPE1_03 "Load unsigned half" "@") 4367 1.1 christos (load-gr-r ld SI OP_02 OPE1_04 "Load word" "$ldann") 4368 1.1 christos 4369 1.1 christos (define-pmacro (load-fr-r name mode op ope comment) 4370 1.1 christos (dni name 4371 1.1 christos (comment) 4372 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) 4373 1.1 christos (FR400-MAJOR I-2) (FR450-MAJOR I-2) FR-ACCESS) 4374 1.1 christos (.str name "$pack @($GRi,$GRj),$FRintk") 4375 1.1 christos (+ pack FRintk op GRi ope GRj) 4376 1.1 christos (set FRintk (c-call mode (.str "@cpu@_read_mem_" mode) pc (add GRi GRj))) 4377 1.1 christos ((fr400 (unit u-fr-load)) (fr450 (unit u-fr-load)) 4378 1.1 christos (fr500 (unit u-fr-load)) (fr550 (unit u-fr-load))) 4379 1.1 christos ) 4380 1.1 christos ) 4381 1.1 christos 4382 1.1 christos (load-fr-r ldbf UQI OP_02 OPE1_08 "Load byte float") 4383 1.1 christos (load-fr-r ldhf UHI OP_02 OPE1_09 "Load half float") 4384 1.1 christos (load-fr-r ldf SI OP_02 OPE1_0A "Load word float") 4385 1.1 christos 4386 1.1 christos (define-pmacro (load-cpr-r name mode op ope reg attr comment) 4387 1.1 christos (dni name 4388 1.1 christos (comment) 4389 1.1 christos ((UNIT LOAD) (FR500-MAJOR I-2) attr) 4390 1.1 christos (.str name "$pack @($GRi,$GRj),$" reg "k") 4391 1.1 christos (+ pack (.sym reg k) op GRi ope GRj) 4392 1.1 christos (set (.sym reg k) 4393 1.1 christos (c-call mode (.str "@cpu@_read_mem_" mode) pc (add GRi GRj))) 4394 1.1 christos () 4395 1.1 christos ) 4396 1.1 christos ) 4397 1.1 christos 4398 1.1 christos (load-cpr-r ldc SI OP_02 OPE1_0D CPR (MACH frv) "Load coprocessor word") 4399 1.1 christos 4400 1.1 christos ; These correspond to enumerators in frv-sim.h 4401 1.1 christos (define-pmacro (ne-UQI-size) 0) 4402 1.1 christos (define-pmacro (ne-QI-size) 1) 4403 1.1 christos (define-pmacro (ne-UHI-size) 2) 4404 1.1 christos (define-pmacro (ne-HI-size) 3) 4405 1.1 christos (define-pmacro (ne-SI-size) 4) 4406 1.1 christos (define-pmacro (ne-DI-size) 5) 4407 1.1 christos (define-pmacro (ne-XI-size) 6) 4408 1.1 christos 4409 1.1 christos (define-pmacro (ne-load-semantics base dispix targ idisp size is_float action) 4410 1.1 christos (sequence ((BI do_op)) 4411 1.1 christos (set do_op 4412 1.1 christos (c-call BI "@cpu@_check_non_excepting_load" 4413 1.1 christos (index-of base) dispix (index-of targ) 4414 1.1 christos idisp size is_float)) 4415 1.1 christos (if do_op action)) 4416 1.1 christos ) 4417 1.1 christos 4418 1.1 christos (define-pmacro (ne-load-gr-r name mode op ope size comment) 4419 1.1 christos (dni name 4420 1.1 christos (comment) 4421 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) NON-EXCEPTING 4422 1.1 christos (MACH simple,tomcat,fr500,fr550,frv)) 4423 1.1 christos (.str name "$pack @($GRi,$GRj),$GRk") 4424 1.1 christos (+ pack GRk op GRi ope GRj) 4425 1.1 christos (ne-load-semantics GRi (index-of GRj) GRk 0 size 0 4426 1.1 christos (set GRk 4427 1.1 christos (c-call mode (.str "@cpu@_read_mem_" mode) 4428 1.1 christos pc (add GRi GRj)))) 4429 1.1 christos ((fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) 4430 1.1 christos ) 4431 1.1 christos ) 4432 1.1 christos 4433 1.1 christos (ne-load-gr-r nldsb QI OP_02 OPE1_20 (ne-QI-size) "Load signed byte") 4434 1.1 christos (ne-load-gr-r nldub UQI OP_02 OPE1_21 (ne-UQI-size) "Load unsigned byte") 4435 1.1 christos (ne-load-gr-r nldsh HI OP_02 OPE1_22 (ne-HI-size) "Load signed half") 4436 1.1 christos (ne-load-gr-r nlduh UHI OP_02 OPE1_23 (ne-UHI-size) "Load unsigned half") 4437 1.1 christos (ne-load-gr-r nld SI OP_02 OPE1_24 (ne-SI-size) "Load word") 4438 1.1 christos 4439 1.1 christos (define-pmacro (ne-load-fr-r name mode op ope size comment) 4440 1.1 christos (dni name 4441 1.1 christos (comment) 4442 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) NON-EXCEPTING FR-ACCESS 4443 1.1 christos (MACH simple,tomcat,fr500,fr550,frv)) 4444 1.1 christos (.str name "$pack @($GRi,$GRj),$FRintk") 4445 1.1 christos (+ pack FRintk op GRi ope GRj) 4446 1.1 christos (ne-load-semantics GRi (index-of GRj) FRintk 0 size 1 4447 1.1 christos (set FRintk 4448 1.1 christos (c-call mode (.str "@cpu@_read_mem_" mode) 4449 1.1 christos pc (add GRi GRj)))) 4450 1.1 christos ((fr500 (unit u-fr-load)) (fr550 (unit u-fr-load))) 4451 1.1 christos ) 4452 1.1 christos ) 4453 1.1 christos 4454 1.1 christos (ne-load-fr-r nldbf UQI OP_02 OPE1_28 (ne-UQI-size) "Load byte float") 4455 1.1 christos (ne-load-fr-r nldhf UHI OP_02 OPE1_29 (ne-UHI-size) "Load half float") 4456 1.1 christos (ne-load-fr-r nldf SI OP_02 OPE1_2A (ne-SI-size) "Load word float") 4457 1.1 christos 4458 1.1 christos ; Semantics for a load-double insn 4459 1.1 christos ; 4460 1.1 christos (define-pmacro (load-double-semantics not_gr mode regtype address arg) 4461 1.1 christos (if (orif not_gr (ne (index-of (.sym regtype doublek)) 0)) 4462 1.1 christos (sequence () 4463 1.1 christos (set address (add GRi arg)) 4464 1.1 christos (set (.sym regtype doublek) 4465 1.1 christos (c-call mode (.str "@cpu@_read_mem_" mode) pc address)))) 4466 1.1 christos ) 4467 1.1 christos 4468 1.1 christos (define-pmacro (load-double-r-r 4469 1.1 christos name not_gr mode op ope regtype attr profile comment ann) 4470 1.1 christos (dni name 4471 1.1 christos (comment) 4472 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) 4473 1.1 christos (FR400-MAJOR I-2) (FR450-MAJOR I-2) attr) 4474 1.1 christos (.str name "$pack " ann "($GRi,$GRj),$" regtype "doublek") 4475 1.1 christos (+ pack (.sym regtype doublek) op GRi ope GRj) 4476 1.1 christos (sequence ((WI address)) 4477 1.1 christos (load-double-semantics not_gr mode regtype address GRj)) 4478 1.1 christos profile 4479 1.1 christos ) 4480 1.1 christos ) 4481 1.1 christos 4482 1.1 christos (dann lddann "ldd annotation" SI "ldd_annotation" "at") 4483 1.1 christos 4484 1.1 christos (load-double-r-r ldd 0 DI OP_02 OPE1_05 GR NA 4485 1.1 christos ((fr400 (unit u-gr-load)) (fr450 (unit u-gr-load)) 4486 1.1 christos (fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) 4487 1.1 christos "Load double word" "$lddann") 4488 1.1 christos (load-double-r-r lddf 1 DF OP_02 OPE1_0B FR FR-ACCESS 4489 1.1 christos ((fr400 (unit u-fr-load)) (fr450 (unit u-fr-load)) 4490 1.1 christos (fr500 (unit u-fr-load)) (fr550 (unit u-fr-load))) 4491 1.1 christos "Load double float" "@") 4492 1.1 christos (load-double-r-r lddc 1 DI OP_02 OPE1_0E CPR (MACH frv) () 4493 1.1 christos "Load coprocessor double" "@") 4494 1.1 christos 4495 1.1 christos (define-pmacro (ne-load-double-r-r 4496 1.1 christos name not_gr mode op ope regtype size is_float attr profile 4497 1.1 christos comment) 4498 1.1 christos (dni name 4499 1.1 christos (comment) 4500 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) NON-EXCEPTING attr 4501 1.1 christos (MACH simple,tomcat,fr500,fr550,frv)) 4502 1.1 christos (.str name "$pack @($GRi,$GRj),$" regtype "doublek") 4503 1.1 christos (+ pack (.sym regtype doublek) op GRi ope GRj) 4504 1.1 christos (sequence ((WI address)) 4505 1.1 christos (ne-load-semantics GRi (index-of GRj) (.sym regtype doublek) 4506 1.1 christos 0 size is_float 4507 1.1 christos (load-double-semantics not_gr mode 4508 1.1 christos regtype 4509 1.1 christos address GRj))) 4510 1.1 christos profile 4511 1.1 christos ) 4512 1.1 christos ) 4513 1.1 christos 4514 1.1 christos (ne-load-double-r-r nldd 0 DI OP_02 OPE1_25 GR (ne-DI-size) 0 NA 4515 1.1 christos ((fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) "Load double word") 4516 1.1 christos (ne-load-double-r-r nlddf 1 DF OP_02 OPE1_2B FR (ne-DI-size) 1 FR-ACCESS 4517 1.1 christos ((fr500 (unit u-fr-load)) (fr550 (unit u-fr-load))) "Load double float") 4518 1.1 christos 4519 1.1 christos ; Semantics for a load-quad insn 4520 1.1 christos ; 4521 1.1 christos (define-pmacro (load-quad-semantics regtype address arg) 4522 1.1 christos (sequence () 4523 1.1 christos (set address (add GRi arg)) 4524 1.1 christos (c-call VOID (.str "@cpu@_load_quad_" regtype) 4525 1.1 christos pc address (index-of (.sym regtype k)))) 4526 1.1 christos ) 4527 1.1 christos 4528 1.1 christos (define-pmacro (load-quad-r-r name op ope regtype attr profile comment) 4529 1.1 christos (dni name 4530 1.1 christos (comment) 4531 1.1 christos ((UNIT LOAD) (FR500-MAJOR I-2) (MACH frv) attr) 4532 1.1 christos (.str name "$pack @($GRi,$GRj),$" regtype "k") 4533 1.1 christos (+ pack (.sym regtype k) op GRi ope GRj) 4534 1.1 christos (sequence ((WI address)) 4535 1.1 christos (load-quad-semantics regtype address GRj)) 4536 1.1 christos ; TODO regtype-k not referenced for profiling 4537 1.1 christos profile 4538 1.1 christos ) 4539 1.1 christos ) 4540 1.1 christos 4541 1.1 christos (load-quad-r-r ldq OP_02 OPE1_06 GR NA ((fr500 (unit u-gr-load))) 4542 1.1 christos "Load quad word") 4543 1.1 christos (load-quad-r-r ldqf OP_02 OPE1_0C FRint FR-ACCESS ((fr500 (unit u-fr-load))) 4544 1.1 christos "Load quad float") 4545 1.1 christos (load-quad-r-r ldqc OP_02 OPE1_0F CPR NA () "Load coprocessor quad") 4546 1.1 christos 4547 1.1 christos (define-pmacro (ne-load-quad-r-r 4548 1.1 christos name op ope regtype size is_float attr profile comment) 4549 1.1 christos (dni name 4550 1.1 christos (comment) 4551 1.1 christos ((UNIT LOAD) (FR500-MAJOR I-2) (MACH frv) NON-EXCEPTING attr) 4552 1.1 christos (.str name "$pack @($GRi,$GRj),$" regtype "k") 4553 1.1 christos (+ pack (.sym regtype k) op GRi ope GRj) 4554 1.1 christos (sequence ((WI address)) 4555 1.1 christos (ne-load-semantics GRi (index-of GRj) (.sym regtype k) 4556 1.1 christos 0 size is_float 4557 1.1 christos (load-quad-semantics regtype address GRj))) 4558 1.1 christos ; TODO regtype-k not referenced for profiling 4559 1.1 christos profile 4560 1.1 christos ) 4561 1.1 christos ) 4562 1.1 christos 4563 1.1 christos (ne-load-quad-r-r nldq OP_02 OPE1_26 GR (ne-XI-size) 0 NA 4564 1.1 christos ((fr500 (unit u-gr-load))) "Load quad word") 4565 1.1 christos (ne-load-quad-r-r nldqf OP_02 OPE1_2C FRint (ne-XI-size) 1 FR-ACCESS 4566 1.1 christos ((fr500 (unit u-fr-load))) "Load quad float") 4567 1.1 christos 4568 1.1 christos (define-pmacro (load-gr-u-semantics mode) 4569 1.1 christos (sequence ((UWI address)) 4570 1.1 christos (set address (add GRi GRj)) 4571 1.1 christos (set GRk (c-call mode (.str "@cpu@_read_mem_" mode) pc address)) 4572 1.1 christos (if (ne (index-of GRi) (index-of GRk)) 4573 1.1 christos (sequence () 4574 1.1 christos (set GRi address) 4575 1.1 christos (c-call VOID "@cpu@_force_update")))) 4576 1.1 christos ) 4577 1.1 christos 4578 1.1 christos (define-pmacro (load-gr-u name mode op ope comment) 4579 1.1 christos (dni name 4580 1.1 christos (comment) 4581 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) 4582 1.1 christos (FR400-MAJOR I-2) (FR450-MAJOR I-2)) 4583 1.1 christos (.str name "$pack @($GRi,$GRj),$GRk") 4584 1.1 christos (+ pack GRk op GRi ope GRj) 4585 1.1 christos (load-gr-u-semantics mode) 4586 1.1 christos ((fr400 (unit u-gr-load)) (fr450 (unit u-gr-load)) 4587 1.1 christos (fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) 4588 1.1 christos ) 4589 1.1 christos ) 4590 1.1 christos 4591 1.1 christos (load-gr-u ldsbu QI OP_02 OPE1_10 "Load signed byte, update index") 4592 1.1 christos (load-gr-u ldubu UQI OP_02 OPE1_11 "Load unsigned byte, update index") 4593 1.1 christos (load-gr-u ldshu HI OP_02 OPE1_12 "Load signed half, update index") 4594 1.1 christos (load-gr-u lduhu UHI OP_02 OPE1_13 "Load unsigned half, update index") 4595 1.1 christos (load-gr-u ldu SI OP_02 OPE1_14 "Load word, update index") 4596 1.1 christos 4597 1.1 christos (define-pmacro (ne-load-gr-u name mode op ope size comment) 4598 1.1 christos (dni name 4599 1.1 christos (comment) 4600 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) NON-EXCEPTING 4601 1.1 christos (MACH simple,tomcat,fr500,fr550,frv)) 4602 1.1 christos (.str name "$pack @($GRi,$GRj),$GRk") 4603 1.1 christos (+ pack GRk op GRi ope GRj) 4604 1.1 christos (ne-load-semantics GRi (index-of GRj) GRk 0 size 0 (load-gr-u-semantics mode)) 4605 1.1 christos ((fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) 4606 1.1 christos ) 4607 1.1 christos ) 4608 1.1 christos 4609 1.1 christos (ne-load-gr-u nldsbu QI OP_02 OPE1_30 (ne-QI-size) "Load signed byte, update index") 4610 1.1 christos (ne-load-gr-u nldubu UQI OP_02 OPE1_31 (ne-UQI-size) "Load unsigned byte, update index") 4611 1.1 christos (ne-load-gr-u nldshu HI OP_02 OPE1_32 (ne-HI-size) "Load signed half, update index") 4612 1.1 christos (ne-load-gr-u nlduhu UHI OP_02 OPE1_33 (ne-UHI-size) "Load unsigned half, update index") 4613 1.1 christos (ne-load-gr-u nldu SI OP_02 OPE1_34 (ne-SI-size) "Load word, update index") 4614 1.1 christos 4615 1.1 christos (define-pmacro (load-non-gr-u-semantics mode regtype) 4616 1.1 christos (sequence ((UWI address)) 4617 1.1 christos (set address (add GRi GRj)) 4618 1.1 christos (set (.sym regtype k) 4619 1.1 christos (c-call mode (.str "@cpu@_read_mem_" mode) pc address)) 4620 1.1 christos (set GRi address) 4621 1.1 christos (c-call VOID "@cpu@_force_update")) 4622 1.1 christos ) 4623 1.1 christos 4624 1.1 christos (define-pmacro (load-fr-u name mode op ope comment) 4625 1.1 christos (dni name 4626 1.1 christos (comment) 4627 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) 4628 1.1 christos (FR400-MAJOR I-2) (FR450-MAJOR I-2) FR-ACCESS) 4629 1.1 christos (.str name "$pack @($GRi,$GRj),$FRintk") 4630 1.1 christos (+ pack FRintk op GRi ope GRj) 4631 1.1 christos (load-non-gr-u-semantics mode FRint) 4632 1.1 christos ((fr400 (unit u-fr-load)) (fr450 (unit u-fr-load)) 4633 1.1 christos (fr500 (unit u-fr-load)) (fr550 (unit u-fr-load))) 4634 1.1 christos ) 4635 1.1 christos ) 4636 1.1 christos 4637 1.1 christos (load-fr-u ldbfu UQI OP_02 OPE1_18 "Load byte float, update index") 4638 1.1 christos (load-fr-u ldhfu UHI OP_02 OPE1_19 "Load half float, update index") 4639 1.1 christos (load-fr-u ldfu SI OP_02 OPE1_1A "Load word float, update index") 4640 1.1 christos 4641 1.1 christos (define-pmacro (load-cpr-u name mode op ope comment) 4642 1.1 christos (dni name 4643 1.1 christos (comment) 4644 1.1 christos ((UNIT LOAD) (FR500-MAJOR I-2) (MACH frv)) 4645 1.1 christos (.str name "$pack @($GRi,$GRj),$CPRk") 4646 1.1 christos (+ pack CPRk op GRi ope GRj) 4647 1.1 christos (load-non-gr-u-semantics mode CPR) 4648 1.1 christos () 4649 1.1 christos ) 4650 1.1 christos ) 4651 1.1 christos 4652 1.1 christos (load-cpr-u ldcu SI OP_02 OPE1_1D "Load coprocessor word float,update index") 4653 1.1 christos 4654 1.1 christos (define-pmacro (ne-load-non-gr-u name mode op ope regtype size comment) 4655 1.1 christos (dni name 4656 1.1 christos (comment) 4657 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) NON-EXCEPTING FR-ACCESS 4658 1.1 christos (MACH simple,tomcat,fr500,fr550,frv)) 4659 1.1 christos (.str name "$pack @($GRi,$GRj),$" regtype "k") 4660 1.1 christos (+ pack (.sym regtype k) op GRi ope GRj) 4661 1.1 christos (ne-load-semantics GRi (index-of GRj) (.sym regtype k) 0 size 1 4662 1.1 christos (load-non-gr-u-semantics mode regtype)) 4663 1.1 christos ((fr500 (unit u-fr-load)) (fr550 (unit u-fr-load))) 4664 1.1 christos ) 4665 1.1 christos ) 4666 1.1 christos 4667 1.1 christos (ne-load-non-gr-u nldbfu UQI OP_02 OPE1_38 FRint (ne-UQI-size) "Load byte float, update index") 4668 1.1 christos (ne-load-non-gr-u nldhfu UHI OP_02 OPE1_39 FRint (ne-UHI-size) "Load half float, update index") 4669 1.1 christos (ne-load-non-gr-u nldfu SI OP_02 OPE1_3A FRint (ne-SI-size) "Load word float, update index") 4670 1.1 christos 4671 1.1 christos (define-pmacro (load-double-gr-u-semantics) 4672 1.1 christos (sequence ((WI address)) 4673 1.1 christos (load-double-semantics 0 DI GR address GRj) 4674 1.1 christos (if (ne (index-of GRi) (index-of GRdoublek)) 4675 1.1 christos (sequence () 4676 1.1 christos (set GRi address) 4677 1.1 christos (c-call VOID "@cpu@_force_update")))) 4678 1.1 christos ) 4679 1.1 christos 4680 1.1 christos (define-pmacro (load-double-gr-u name op ope comment) 4681 1.1 christos (dni name 4682 1.1 christos (comment) 4683 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) 4684 1.1 christos (FR400-MAJOR I-2) (FR450-MAJOR I-2)) 4685 1.1 christos (.str name "$pack @($GRi,$GRj),$GRdoublek") 4686 1.1 christos (+ pack GRdoublek op GRi ope GRj) 4687 1.1 christos (load-double-gr-u-semantics) 4688 1.1 christos ((fr400 (unit u-gr-load)) (fr450 (unit u-gr-load)) 4689 1.1 christos (fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) 4690 1.1 christos ) 4691 1.1 christos ) 4692 1.1 christos 4693 1.1 christos (load-double-gr-u lddu OP_02 OPE1_15 "Load double word, update index") 4694 1.1 christos 4695 1.1 christos (define-pmacro (ne-load-double-gr-u name op ope size comment) 4696 1.1 christos (dni name 4697 1.1 christos (comment) 4698 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) NON-EXCEPTING 4699 1.1 christos (MACH simple,tomcat,fr500,fr550,frv)) 4700 1.1 christos (.str name "$pack @($GRi,$GRj),$GRdoublek") 4701 1.1 christos (+ pack GRdoublek op GRi ope GRj) 4702 1.1 christos (ne-load-semantics GRi (index-of GRj) GRdoublek 0 size 0 4703 1.1 christos (load-double-gr-u-semantics)) 4704 1.1 christos ((fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) 4705 1.1 christos 4706 1.1 christos ) 4707 1.1 christos ) 4708 1.1 christos 4709 1.1 christos (ne-load-double-gr-u nlddu OP_02 OPE1_35 (ne-DI-size) "Load double word, update index") 4710 1.1 christos 4711 1.1 christos (define-pmacro (load-double-non-gr-u-semantics mode regtype) 4712 1.1 christos (sequence ((WI address)) 4713 1.1 christos (load-double-semantics 1 mode regtype address GRj) 4714 1.1 christos (set GRi address) 4715 1.1 christos (c-call VOID "@cpu@_force_update")) 4716 1.1 christos ) 4717 1.1 christos 4718 1.1 christos (define-pmacro (load-double-non-gr-u 4719 1.1 christos name mode op ope regtype attr profile comment) 4720 1.1 christos (dni name 4721 1.1 christos (comment) 4722 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) 4723 1.1 christos (FR400-MAJOR I-2) (FR450-MAJOR I-2) attr) 4724 1.1 christos (.str name "$pack @($GRi,$GRj),$" regtype "doublek") 4725 1.1 christos (+ pack (.sym regtype doublek) op GRi ope GRj) 4726 1.1 christos (load-double-non-gr-u-semantics mode regtype) 4727 1.1 christos profile 4728 1.1 christos ) 4729 1.1 christos ) 4730 1.1 christos 4731 1.1 christos (load-double-non-gr-u lddfu DF OP_02 OPE1_1B FR FR-ACCESS 4732 1.1 christos ((fr400 (unit u-fr-load)) (fr450 (unit u-fr-load)) 4733 1.1 christos (fr500 (unit u-fr-load)) (fr550 (unit u-fr-load))) 4734 1.1 christos "Load double float, update index") 4735 1.1 christos (load-double-non-gr-u lddcu DI OP_02 OPE1_1E CPR (MACH frv) 4736 1.1 christos () "Load coprocessor double float, update index") 4737 1.1 christos 4738 1.1 christos (define-pmacro (ne-load-double-non-gr-u name mode op ope regtype size comment) 4739 1.1 christos (dni name 4740 1.1 christos (comment) 4741 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) NON-EXCEPTING FR-ACCESS 4742 1.1 christos (MACH simple,tomcat,fr500,fr550,frv)) 4743 1.1 christos (.str name "$pack @($GRi,$GRj),$" regtype "doublek") 4744 1.1 christos (+ pack (.sym regtype doublek) op GRi ope GRj) 4745 1.1 christos (ne-load-semantics GRi (index-of GRj) (.sym regtype doublek) 0 size 1 4746 1.1 christos (load-double-non-gr-u-semantics mode regtype)) 4747 1.1 christos ((fr500 (unit u-fr-load)) (fr550 (unit u-fr-load))) 4748 1.1 christos ) 4749 1.1 christos ) 4750 1.1 christos 4751 1.1 christos (ne-load-double-non-gr-u nlddfu DF OP_02 OPE1_3B FR (ne-DI-size) "Load double float, update index") 4752 1.1 christos 4753 1.1 christos (define-pmacro (load-quad-gr-u-semantics) 4754 1.1 christos (sequence ((WI address)) 4755 1.1 christos (load-quad-semantics GR address GRj) 4756 1.1 christos (if (ne (index-of GRi) (index-of GRk)) 4757 1.1 christos (sequence () 4758 1.1 christos (set GRi address) 4759 1.1 christos (c-call VOID "@cpu@_force_update")))) 4760 1.1 christos ) 4761 1.1 christos 4762 1.1 christos (define-pmacro (load-quad-gr-u name op ope comment) 4763 1.1 christos (dni name 4764 1.1 christos (comment) 4765 1.1 christos ((UNIT LOAD) (FR500-MAJOR I-2) (MACH frv)) 4766 1.1 christos (.str name "$pack @($GRi,$GRj),$GRk") 4767 1.1 christos (+ pack GRk op GRi ope GRj) 4768 1.1 christos (load-quad-gr-u-semantics) 4769 1.1 christos ; TODO - GRk not referenced here for profiling 4770 1.1 christos ((fr500 (unit u-gr-load))) 4771 1.1 christos ) 4772 1.1 christos ) 4773 1.1 christos 4774 1.1 christos (load-quad-gr-u ldqu OP_02 OPE1_16 "Load quad word, update index") 4775 1.1 christos 4776 1.1 christos (define-pmacro (ne-load-quad-gr-u name op ope size comment) 4777 1.1 christos (dni name 4778 1.1 christos (comment) 4779 1.1 christos ((UNIT LOAD) (FR500-MAJOR I-2) (MACH frv) NON-EXCEPTING) 4780 1.1 christos (.str name "$pack @($GRi,$GRj),$GRk") 4781 1.1 christos (+ pack GRk op GRi ope GRj) 4782 1.1 christos (ne-load-semantics GRi (index-of GRj) GRk 0 size 0 4783 1.1 christos (load-quad-gr-u-semantics)) 4784 1.1 christos ; TODO - GRk not referenced here for profiling 4785 1.1 christos ((fr500 (unit u-gr-load))) 4786 1.1 christos ) 4787 1.1 christos ) 4788 1.1 christos 4789 1.1 christos (ne-load-quad-gr-u nldqu OP_02 OPE1_36 (ne-XI-size) "Load quad word, update index") 4790 1.1 christos 4791 1.1 christos (define-pmacro (load-quad-non-gr-u-semantics regtype) 4792 1.1 christos (sequence ((WI address)) 4793 1.1 christos (load-quad-semantics regtype address GRj) 4794 1.1 christos (set GRi address) 4795 1.1 christos (c-call VOID "@cpu@_force_update")) 4796 1.1 christos ) 4797 1.1 christos 4798 1.1 christos (define-pmacro (load-quad-non-gr-u name op ope regtype attr profile comment) 4799 1.1 christos (dni name 4800 1.1 christos (comment) 4801 1.1 christos ((UNIT LOAD) (FR500-MAJOR I-2) (MACH frv) attr) 4802 1.1 christos (.str name "$pack @($GRi,$GRj),$" regtype "k") 4803 1.1 christos (+ pack (.sym regtype k) op GRi ope GRj) 4804 1.1 christos (load-quad-non-gr-u-semantics regtype) 4805 1.1 christos profile 4806 1.1 christos ) 4807 1.1 christos ) 4808 1.1 christos 4809 1.1 christos (load-quad-non-gr-u ldqfu OP_02 OPE1_1C FRint FR-ACCESS 4810 1.1 christos ((fr500 (unit u-fr-load))) "Load quad float, update index") 4811 1.1 christos (load-quad-non-gr-u ldqcu OP_02 OPE1_1F CPR NA 4812 1.1 christos () "Load coprocessor quad word, update index") 4813 1.1 christos 4814 1.1 christos (define-pmacro (ne-load-quad-non-gr-u name op ope regtype size comment) 4815 1.1 christos (dni name 4816 1.1 christos (comment) 4817 1.1 christos ((UNIT LOAD) (FR500-MAJOR I-2) (MACH frv) NON-EXCEPTING FR-ACCESS) 4818 1.1 christos (.str name "$pack @($GRi,$GRj),$" regtype "k") 4819 1.1 christos (+ pack (.sym regtype k) op GRi ope GRj) 4820 1.1 christos (ne-load-semantics GRi (index-of GRj) (.sym regtype k) 0 size 1 4821 1.1 christos (load-quad-non-gr-u-semantics regtype)) 4822 1.1 christos ((fr500 (unit u-fr-load))) 4823 1.1 christos ) 4824 1.1 christos ) 4825 1.1 christos 4826 1.1 christos (ne-load-quad-non-gr-u nldqfu OP_02 OPE1_3C FRint (ne-XI-size) "Load quad float,update index") 4827 1.1 christos 4828 1.1 christos (define-pmacro (load-r-simm name mode op regtype attr profile comment) 4829 1.1 christos (dni name 4830 1.1 christos (comment) 4831 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) 4832 1.1 christos (FR400-MAJOR I-2) (FR450-MAJOR I-2) attr) 4833 1.1 christos (.str name "$pack @($GRi,$d12),$" regtype "k") 4834 1.1 christos (+ pack (.sym regtype k) op GRi d12) 4835 1.1 christos (set (.sym regtype k) 4836 1.1 christos (c-call mode (.str "@cpu@_read_mem_" mode) pc (add GRi d12))) 4837 1.1 christos profile 4838 1.1 christos ) 4839 1.1 christos ) 4840 1.1 christos 4841 1.1 christos (load-r-simm ldsbi QI OP_30 GR NA 4842 1.1 christos ((fr400 (unit u-gr-load)) (fr450 (unit u-gr-load)) 4843 1.1 christos (fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) 4844 1.1 christos "Load signed byte") 4845 1.1 christos (load-r-simm ldshi HI OP_31 GR NA 4846 1.1 christos ((fr400 (unit u-gr-load)) (fr450 (unit u-gr-load)) 4847 1.1 christos (fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) 4848 1.1 christos "Load signed half") 4849 1.1 christos (load-r-simm ldi SI OP_32 GR NA 4850 1.1 christos ((fr400 (unit u-gr-load)) (fr450 (unit u-gr-load)) 4851 1.1 christos (fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) 4852 1.1 christos "Load word") 4853 1.1 christos (load-r-simm ldubi UQI OP_35 GR NA 4854 1.1 christos ((fr400 (unit u-gr-load)) (fr450 (unit u-gr-load)) 4855 1.1 christos (fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) 4856 1.1 christos "Load unsigned byte") 4857 1.1 christos (load-r-simm lduhi UHI OP_36 GR NA 4858 1.1 christos ((fr400 (unit u-gr-load)) (fr450 (unit u-gr-load)) 4859 1.1 christos (fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) 4860 1.1 christos "Load unsigned half") 4861 1.1 christos 4862 1.1 christos (load-r-simm ldbfi UQI OP_38 FRint FR-ACCESS 4863 1.1 christos ((fr400 (unit u-fr-load)) (fr450 (unit u-fr-load)) 4864 1.1 christos (fr500 (unit u-fr-load)) (fr550 (unit u-fr-load))) 4865 1.1 christos "Load byte float") 4866 1.1 christos (load-r-simm ldhfi UHI OP_39 FRint FR-ACCESS 4867 1.1 christos ((fr400 (unit u-fr-load)) (fr450 (unit u-fr-load)) 4868 1.1 christos (fr500 (unit u-fr-load)) (fr550 (unit u-fr-load))) 4869 1.1 christos "Load half float") 4870 1.1 christos (load-r-simm ldfi SI OP_3A FRint FR-ACCESS 4871 1.1 christos ((fr400 (unit u-fr-load)) (fr450 (unit u-fr-load)) 4872 1.1 christos (fr500 (unit u-fr-load)) (fr550 (unit u-fr-load))) 4873 1.1 christos "Load word float") 4874 1.1 christos 4875 1.1 christos (define-pmacro (ne-load-r-simm 4876 1.1 christos name mode op regtype size is_float attr profile comment) 4877 1.1 christos (dni name 4878 1.1 christos (comment) 4879 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) NON-EXCEPTING attr 4880 1.1 christos (MACH simple,tomcat,fr500,fr550,frv)) 4881 1.1 christos (.str name "$pack @($GRi,$d12),$" regtype "k") 4882 1.1 christos (+ pack (.sym regtype k) op GRi d12) 4883 1.1 christos (ne-load-semantics GRi -1 (.sym regtype k) d12 size is_float 4884 1.1 christos (set (.sym regtype k) 4885 1.1 christos (c-call mode (.str "@cpu@_read_mem_" mode) 4886 1.1 christos pc (add GRi d12)))) 4887 1.1 christos profile 4888 1.1 christos ) 4889 1.1 christos ) 4890 1.1 christos 4891 1.1 christos (ne-load-r-simm nldsbi QI OP_40 GR (ne-QI-size) 0 NA 4892 1.1 christos ((fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) "Load signed byte") 4893 1.1 christos (ne-load-r-simm nldubi UQI OP_41 GR (ne-UQI-size) 0 NA 4894 1.1 christos ((fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) "Load unsigned byte") 4895 1.1 christos (ne-load-r-simm nldshi HI OP_42 GR (ne-HI-size) 0 NA 4896 1.1 christos ((fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) "Load signed half") 4897 1.1 christos (ne-load-r-simm nlduhi UHI OP_43 GR (ne-UHI-size) 0 NA 4898 1.1 christos ((fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) "Load unsigned half") 4899 1.1 christos (ne-load-r-simm nldi SI OP_44 GR (ne-SI-size) 0 NA 4900 1.1 christos ((fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) "Load word") 4901 1.1 christos 4902 1.1 christos (ne-load-r-simm nldbfi UQI OP_48 FRint (ne-UQI-size) 1 FR-ACCESS 4903 1.1 christos ((fr500 (unit u-fr-load)) (fr550 (unit u-fr-load))) "Load byte float") 4904 1.1 christos (ne-load-r-simm nldhfi UHI OP_49 FRint (ne-UHI-size) 1 FR-ACCESS 4905 1.1 christos ((fr500 (unit u-fr-load)) (fr550 (unit u-fr-load))) "Load half float") 4906 1.1 christos (ne-load-r-simm nldfi SI OP_4A FRint (ne-SI-size) 1 FR-ACCESS 4907 1.1 christos ((fr500 (unit u-fr-load)) (fr550 (unit u-fr-load))) "Load word float") 4908 1.1 christos 4909 1.1 christos (define-pmacro (load-double-r-simm 4910 1.1 christos name not_gr mode op regtype attr profile comment) 4911 1.1 christos (dni name 4912 1.1 christos (comment) 4913 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) 4914 1.1 christos (FR400-MAJOR I-2) (FR450-MAJOR I-2) attr) 4915 1.1 christos (.str name "$pack @($GRi,$d12),$" regtype "doublek") 4916 1.1 christos (+ pack (.sym regtype doublek) op GRi d12) 4917 1.1 christos (sequence ((WI address)) 4918 1.1 christos (load-double-semantics not_gr mode regtype address d12)) 4919 1.1 christos profile 4920 1.1 christos ) 4921 1.1 christos ) 4922 1.1 christos 4923 1.1 christos (load-double-r-simm lddi 0 DI OP_33 GR NA 4924 1.1 christos ((fr400 (unit u-gr-load)) (fr450 (unit u-gr-load)) 4925 1.1 christos (fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) 4926 1.1 christos "Load double word") 4927 1.1 christos (load-double-r-simm lddfi 1 DF OP_3B FR FR-ACCESS 4928 1.1 christos ((fr400 (unit u-fr-load)) (fr450 (unit u-fr-load)) 4929 1.1 christos (fr500 (unit u-fr-load)) (fr550 (unit u-fr-load))) 4930 1.1 christos "Load double float") 4931 1.1 christos 4932 1.1 christos (define-pmacro (ne-load-double-r-simm 4933 1.1 christos name not_gr mode op regtype size is_float attr profile comment) 4934 1.1 christos (dni name 4935 1.1 christos (comment) 4936 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) NON-EXCEPTING attr 4937 1.1 christos (MACH simple,tomcat,fr500,fr550,frv)) 4938 1.1 christos (.str name "$pack @($GRi,$d12),$" regtype "doublek") 4939 1.1 christos (+ pack (.sym regtype doublek) op GRi d12) 4940 1.1 christos (sequence ((WI address)) 4941 1.1 christos (ne-load-semantics GRi -1 (.sym regtype doublek) 4942 1.1 christos d12 size is_float 4943 1.1 christos (load-double-semantics not_gr mode 4944 1.1 christos regtype 4945 1.1 christos address d12))) 4946 1.1 christos profile 4947 1.1 christos ) 4948 1.1 christos ) 4949 1.1 christos 4950 1.1 christos (ne-load-double-r-simm nlddi 0 DI OP_45 GR (ne-DI-size) 0 NA 4951 1.1 christos ((fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) "Load double word") 4952 1.1 christos (ne-load-double-r-simm nlddfi 1 DF OP_4B FR (ne-DI-size) 1 FR-ACCESS 4953 1.1 christos ((fr500 (unit u-fr-load)) (fr550 (unit u-fr-load))) "Load double float") 4954 1.1 christos 4955 1.1 christos (define-pmacro (load-quad-r-simm name op regtype attr profile comment) 4956 1.1 christos (dni name 4957 1.1 christos (comment) 4958 1.1 christos ((UNIT LOAD) (FR500-MAJOR I-2) (MACH frv) attr) 4959 1.1 christos (.str name "$pack @($GRi,$d12),$" regtype "k") 4960 1.1 christos (+ pack (.sym regtype k) op GRi d12) 4961 1.1 christos (sequence ((WI address)) 4962 1.1 christos (load-quad-semantics regtype address d12)) 4963 1.1 christos profile 4964 1.1 christos ) 4965 1.1 christos ) 4966 1.1 christos 4967 1.1 christos (load-quad-r-simm ldqi OP_34 GR NA 4968 1.1 christos ((fr500 (unit u-gr-load))) "Load quad word") 4969 1.1 christos (load-quad-r-simm ldqfi OP_3C FRint FR-ACCESS 4970 1.1 christos ((fr500 (unit u-fr-load))) "Load quad float") 4971 1.1 christos 4972 1.1 christos (define-pmacro (ne-load-quad-r-simm 4973 1.1 christos name op regtype size is_float attr profile comment) 4974 1.1 christos (dni name 4975 1.1 christos (comment) 4976 1.1 christos ((UNIT LOAD) (FR500-MAJOR I-2) (MACH frv) NON-EXCEPTING attr) 4977 1.1 christos (.str name "$pack @($GRi,$d12),$" regtype "k") 4978 1.1 christos (+ pack (.sym regtype k) op GRi d12) 4979 1.1 christos (sequence ((WI address)) 4980 1.1 christos (ne-load-semantics GRi -1 (.sym regtype k) d12 size is_float 4981 1.1 christos (load-quad-semantics regtype address d12))) 4982 1.1 christos profile 4983 1.1 christos ) 4984 1.1 christos ) 4985 1.1 christos 4986 1.1 christos (ne-load-quad-r-simm nldqfi OP_4C FRint (ne-XI-size) 1 FR-ACCESS 4987 1.1 christos ((fr500 (unit u-fr-load))) "Load quad float") 4988 1.1 christos 4989 1.1 christos (define-pmacro (store-r-r name mode op ope reg attr profile comment) 4990 1.1 christos (dni name 4991 1.1 christos (comment) 4992 1.1 christos ((UNIT STORE) (FR550-MAJOR I-4) (FR500-MAJOR I-3) 4993 1.1 christos (FR400-MAJOR I-3) (FR450-MAJOR I-3) attr) 4994 1.1 christos (.str name "$pack $" reg "k,@($GRi,$GRj)") 4995 1.1 christos (+ pack (.sym reg k) op GRi ope GRj) 4996 1.1 christos (c-call VOID (.str "@cpu@_write_mem_" mode) 4997 1.1 christos pc (add GRi GRj) (.sym reg k)) 4998 1.1 christos profile 4999 1.1 christos ) 5000 1.1 christos ) 5001 1.1 christos 5002 1.1 christos (store-r-r stb QI OP_03 OPE1_00 GR NA 5003 1.1 christos ((fr400 (unit u-gr-store)) (fr450 (unit u-gr-store)) 5004 1.1 christos (fr500 (unit u-gr-store)) (fr550 (unit u-gr-store))) 5005 1.1 christos "Store unsigned byte") 5006 1.1 christos (store-r-r sth HI OP_03 OPE1_01 GR NA 5007 1.1 christos ((fr400 (unit u-gr-store)) (fr450 (unit u-gr-store)) 5008 1.1 christos (fr500 (unit u-gr-store)) (fr550 (unit u-gr-store))) 5009 1.1 christos "Store unsigned half") 5010 1.1 christos (store-r-r st SI OP_03 OPE1_02 GR NA 5011 1.1 christos ((fr400 (unit u-gr-store)) (fr450 (unit u-gr-store)) 5012 1.1 christos (fr500 (unit u-gr-store)) (fr550 (unit u-gr-store))) 5013 1.1 christos "Store word") 5014 1.1 christos 5015 1.1 christos (store-r-r stbf QI OP_03 OPE1_08 FRint FR-ACCESS 5016 1.1 christos ((fr400 (unit u-fr-store)) (fr450 (unit u-fr-store)) 5017 1.1 christos (fr500 (unit u-fr-store)) (fr550 (unit u-fr-store))) 5018 1.1 christos "Store byte float") 5019 1.1 christos (store-r-r sthf HI OP_03 OPE1_09 FRint FR-ACCESS 5020 1.1 christos ((fr400 (unit u-fr-store)) (fr450 (unit u-fr-store)) 5021 1.1 christos (fr500 (unit u-fr-store)) (fr550 (unit u-fr-store))) 5022 1.1 christos "Store half float") 5023 1.1 christos (store-r-r stf SI OP_03 OPE1_0A FRint FR-ACCESS 5024 1.1 christos ((fr400 (unit u-fr-store)) (fr450 (unit u-fr-store)) 5025 1.1 christos (fr500 (unit u-fr-store)) (fr550 (unit u-fr-store))) 5026 1.1 christos "Store word float") 5027 1.1 christos 5028 1.1 christos (store-r-r stc SI OP_03 OPE1_25 CPR (MACH frv) () "Store coprocessor word") 5029 1.1 christos 5030 1.1 christos ; Semantics for a store-double insn 5031 1.1 christos ; 5032 1.1 christos (define-pmacro (store-double-semantics mode regtype address arg) 5033 1.1 christos (sequence () 5034 1.1 christos (set address (add GRi arg)) 5035 1.1 christos (c-call VOID (.str "@cpu@_write_mem_" mode) 5036 1.1 christos pc address (.sym regtype doublek))) 5037 1.1 christos ) 5038 1.1 christos 5039 1.1 christos (define-pmacro (store-double-r-r name mode op ope regtype attr profile comment) 5040 1.1 christos (dni name 5041 1.1 christos (comment) 5042 1.1 christos ((UNIT STORE) (FR550-MAJOR I-4) (FR500-MAJOR I-3) 5043 1.1 christos (FR400-MAJOR I-3) (FR450-MAJOR I-3) attr) 5044 1.1 christos (.str name "$pack $" regtype "doublek,@($GRi,$GRj)") 5045 1.1 christos (+ pack (.sym regtype doublek) op GRi ope GRj) 5046 1.1 christos (sequence ((WI address)) 5047 1.1 christos (store-double-semantics mode regtype address GRj)) 5048 1.1 christos profile 5049 1.1 christos ) 5050 1.1 christos ) 5051 1.1 christos 5052 1.1 christos (store-double-r-r std DI OP_03 OPE1_03 GR NA 5053 1.1 christos ((fr400 (unit u-gr-store)) (fr450 (unit u-gr-store)) 5054 1.1 christos (fr500 (unit u-gr-store)) (fr550 (unit u-gr-store))) 5055 1.1 christos "Store double word") 5056 1.1 christos (store-double-r-r stdf DF OP_03 OPE1_0B FR FR-ACCESS 5057 1.1 christos ((fr400 (unit u-fr-store)) (fr450 (unit u-fr-store)) 5058 1.1 christos (fr500 (unit u-fr-store)) (fr550 (unit u-fr-store))) 5059 1.1 christos "Store double float") 5060 1.1 christos 5061 1.1 christos (store-double-r-r stdc DI OP_03 OPE1_26 CPR (MACH frv) 5062 1.1 christos () "Store coprocessor double word") 5063 1.1 christos 5064 1.1 christos ; Semantics for a store-quad insn 5065 1.1 christos ; 5066 1.1 christos (define-pmacro (store-quad-semantics regtype address arg) 5067 1.1 christos (sequence () 5068 1.1 christos (set address (add GRi arg)) 5069 1.1 christos (c-call VOID (.str "@cpu@_store_quad_" regtype) 5070 1.1 christos pc address (index-of (.sym regtype k)))) 5071 1.1 christos ) 5072 1.1 christos 5073 1.1 christos (define-pmacro (store-quad-r-r name op ope regtype attr profile comment) 5074 1.1 christos (dni name 5075 1.1 christos (comment) 5076 1.1 christos ((UNIT STORE) (FR500-MAJOR I-3) (MACH frv) attr) 5077 1.1 christos (.str name "$pack $" regtype "k,@($GRi,$GRj)") 5078 1.1 christos (+ pack (.sym regtype k) op GRi ope GRj) 5079 1.1 christos (sequence ((WI address)) 5080 1.1 christos (store-quad-semantics regtype address GRj)) 5081 1.1 christos profile 5082 1.1 christos ) 5083 1.1 christos ) 5084 1.1 christos 5085 1.1 christos (store-quad-r-r stq OP_03 OPE1_04 GR NA 5086 1.1 christos ((fr500 (unit u-gr-store))) "Store quad word") 5087 1.1 christos (store-quad-r-r stqf OP_03 OPE1_0C FRint FR-ACCESS 5088 1.1 christos ((fr500 (unit u-fr-store))) 5089 1.1 christos "Store quad float") 5090 1.1 christos (store-quad-r-r stqc OP_03 OPE1_27 CPR NA 5091 1.1 christos () "Store coprocessor quad word") 5092 1.1 christos 5093 1.1 christos (define-pmacro (store-r-r-u name mode op ope regtype attr profile comment) 5094 1.1 christos (dni name 5095 1.1 christos (comment) 5096 1.1 christos ((UNIT STORE) (FR550-MAJOR I-4) (FR500-MAJOR I-3) 5097 1.1 christos (FR400-MAJOR I-3) (FR450-MAJOR I-3) attr) 5098 1.1 christos (.str name "$pack $" regtype "k,@($GRi,$GRj)") 5099 1.1 christos (+ pack (.sym regtype k) op GRi ope GRj) 5100 1.1 christos (sequence ((UWI address)) 5101 1.1 christos (set address (add GRi GRj)) 5102 1.1 christos (c-call VOID (.str "@cpu@_write_mem_" mode) 5103 1.1 christos pc address (.sym regtype k)) 5104 1.1 christos (set GRi address)) 5105 1.1 christos profile 5106 1.1 christos ) 5107 1.1 christos ) 5108 1.1 christos 5109 1.1 christos (store-r-r-u stbu QI OP_03 OPE1_10 GR NA 5110 1.1 christos ((fr400 (unit u-gr-store)) (fr450 (unit u-gr-store)) 5111 1.1 christos (fr500 (unit u-gr-store)) (fr550 (unit u-gr-store))) 5112 1.1 christos "Store unsigned byte, update index") 5113 1.1 christos (store-r-r-u sthu HI OP_03 OPE1_11 GR NA 5114 1.1 christos ((fr400 (unit u-gr-store)) (fr450 (unit u-gr-store)) 5115 1.1 christos (fr500 (unit u-gr-store)) (fr550 (unit u-gr-store))) 5116 1.1 christos "Store unsigned half, update index") 5117 1.1 christos (store-r-r-u stu WI OP_03 OPE1_12 GR NA 5118 1.1 christos ((fr400 (unit u-gr-store)) (fr450 (unit u-gr-store)) 5119 1.1 christos (fr500 (unit u-gr-store)) (fr550 (unit u-gr-store))) 5120 1.1 christos "Store word, update index") 5121 1.1 christos 5122 1.1 christos (store-r-r-u stbfu QI OP_03 OPE1_18 FRint FR-ACCESS 5123 1.1 christos ((fr400 (unit u-fr-store)) (fr450 (unit u-fr-store)) 5124 1.1 christos (fr500 (unit u-fr-store)) (fr550 (unit u-fr-store))) 5125 1.1 christos "Store byte float, update index") 5126 1.1 christos (store-r-r-u sthfu HI OP_03 OPE1_19 FRint FR-ACCESS 5127 1.1 christos ((fr400 (unit u-fr-store)) (fr450 (unit u-fr-store)) 5128 1.1 christos (fr500 (unit u-fr-store)) (fr550 (unit u-fr-store))) 5129 1.1 christos "Store half float, update index") 5130 1.1 christos (store-r-r-u stfu SI OP_03 OPE1_1A FRint FR-ACCESS 5131 1.1 christos ((fr400 (unit u-fr-store)) (fr450 (unit u-fr-store)) 5132 1.1 christos (fr500 (unit u-fr-store)) (fr550 (unit u-fr-store))) 5133 1.1 christos "Store word float, update index") 5134 1.1 christos 5135 1.1 christos (store-r-r-u stcu SI OP_03 OPE1_2D CPR (MACH frv) () 5136 1.1 christos "Store coprocessor word, update index") 5137 1.1 christos 5138 1.1 christos (define-pmacro (store-double-r-r-u 5139 1.1 christos name mode op ope regtype attr profile comment) 5140 1.1 christos (dni name 5141 1.1 christos (comment) 5142 1.1 christos ((UNIT STORE) (FR550-MAJOR I-4) (FR500-MAJOR I-3) 5143 1.1 christos (FR400-MAJOR I-3) (FR450-MAJOR I-3) attr) 5144 1.1 christos (.str name "$pack $" regtype "doublek,@($GRi,$GRj)") 5145 1.1 christos (+ pack (.sym regtype doublek) op GRi ope GRj) 5146 1.1 christos (sequence ((WI address)) 5147 1.1 christos (store-double-semantics mode regtype address GRj) 5148 1.1 christos (set GRi address)) 5149 1.1 christos profile 5150 1.1 christos ) 5151 1.1 christos ) 5152 1.1 christos 5153 1.1 christos (store-double-r-r-u stdu DI OP_03 OPE1_13 GR NA 5154 1.1 christos ((fr400 (unit u-gr-store)) (fr450 (unit u-gr-store)) 5155 1.1 christos (fr500 (unit u-gr-store)) (fr550 (unit u-gr-store))) 5156 1.1 christos "Store double word, update index") 5157 1.1 christos (store-double-r-r-u stdfu DF OP_03 OPE1_1B FR FR-ACCESS 5158 1.1 christos ((fr400 (unit u-fr-store)) (fr450 (unit u-fr-store)) 5159 1.1 christos (fr500 (unit u-fr-store)) (fr550 (unit u-fr-store))) 5160 1.1 christos "Store double float,update index") 5161 1.1 christos (store-double-r-r-u stdcu DI OP_03 OPE1_2E CPR (MACH frv) () 5162 1.1 christos "Store coprocessor double word, update index") 5163 1.1 christos 5164 1.1 christos (define-pmacro (store-quad-r-r-u name op ope regtype attr profile comment) 5165 1.1 christos (dni name 5166 1.1 christos (comment) 5167 1.1 christos ((UNIT STORE) (FR500-MAJOR I-3) (MACH frv) attr) 5168 1.1 christos (.str name "$pack $" regtype "k,@($GRi,$GRj)") 5169 1.1 christos (+ pack (.sym regtype k) op GRi ope GRj) 5170 1.1 christos (sequence ((WI address)) 5171 1.1 christos (store-quad-semantics regtype address GRj) 5172 1.1 christos (set GRi address)) 5173 1.1 christos profile 5174 1.1 christos ) 5175 1.1 christos ) 5176 1.1 christos 5177 1.1 christos (store-quad-r-r-u stqu OP_03 OPE1_14 GR NA 5178 1.1 christos ((fr500 (unit u-gr-store))) 5179 1.1 christos "Store quad word, update index") 5180 1.1 christos (store-quad-r-r-u stqfu OP_03 OPE1_1C FRint FR-ACCESS 5181 1.1 christos ((fr500 (unit u-fr-store))) 5182 1.1 christos "Store quad float, update index") 5183 1.1 christos (store-quad-r-r-u stqcu OP_03 OPE1_2F CPR NA () 5184 1.1 christos "Store coprocessor quad word, update index") 5185 1.1 christos 5186 1.1 christos (define-pmacro (conditional-load name mode op ope regtype profile comment) 5187 1.1 christos (dni name 5188 1.1 christos (comment) 5189 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) 5190 1.1 christos (FR400-MAJOR I-2) (FR450-MAJOR I-2) CONDITIONAL) 5191 1.1 christos (.str name "$pack @($GRi,$GRj),$" regtype "k,$CCi,$cond") 5192 1.1 christos (+ pack (.sym regtype k) op GRi CCi cond ope GRj) 5193 1.1 christos (if (eq CCi (or cond 2)) 5194 1.1 christos (set (.sym regtype k) 5195 1.1 christos (c-call mode (.str "@cpu@_read_mem_" mode) pc (add GRi GRj)))) 5196 1.1 christos profile 5197 1.1 christos ) 5198 1.1 christos ) 5199 1.1 christos 5200 1.1 christos (conditional-load cldsb QI OP_5E OPE4_0 GR 5201 1.1 christos ((fr400 (unit u-gr-load)) (fr450 (unit u-gr-load)) 5202 1.1 christos (fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) 5203 1.1 christos "Load signed byte") 5204 1.1 christos (conditional-load cldub UQI OP_5E OPE4_1 GR 5205 1.1 christos ((fr400 (unit u-gr-load)) (fr450 (unit u-gr-load)) 5206 1.1 christos (fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) 5207 1.1 christos "Load unsigned byte") 5208 1.1 christos (conditional-load cldsh HI OP_5E OPE4_2 GR 5209 1.1 christos ((fr400 (unit u-gr-load)) (fr450 (unit u-gr-load)) 5210 1.1 christos (fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) 5211 1.1 christos "Load signed half") 5212 1.1 christos (conditional-load clduh UHI OP_5E OPE4_3 GR 5213 1.1 christos ((fr400 (unit u-gr-load)) (fr450 (unit u-gr-load)) 5214 1.1 christos (fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) 5215 1.1 christos "Load unsigned half") 5216 1.1 christos (conditional-load cld SI OP_5F OPE4_0 GR 5217 1.1 christos ((fr400 (unit u-gr-load)) (fr450 (unit u-gr-load)) 5218 1.1 christos (fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) 5219 1.1 christos "Load word") 5220 1.1 christos 5221 1.1 christos (conditional-load cldbf UQI OP_60 OPE4_0 FRint 5222 1.1 christos ((fr400 (unit u-fr-load)) (fr450 (unit u-fr-load)) 5223 1.1 christos (fr500 (unit u-fr-load)) (fr550 (unit u-fr-load))) 5224 1.1 christos "Load byte float") 5225 1.1 christos (conditional-load cldhf UHI OP_60 OPE4_1 FRint 5226 1.1 christos ((fr400 (unit u-fr-load)) (fr450 (unit u-fr-load)) 5227 1.1 christos (fr500 (unit u-fr-load)) (fr550 (unit u-fr-load))) 5228 1.1 christos "Load half float") 5229 1.1 christos (conditional-load cldf SI OP_60 OPE4_2 FRint 5230 1.1 christos ((fr400 (unit u-fr-load)) (fr450 (unit u-fr-load)) 5231 1.1 christos (fr500 (unit u-fr-load)) (fr550 (unit u-fr-load))) 5232 1.1 christos "Load word float") 5233 1.1 christos 5234 1.1 christos (define-pmacro (conditional-load-double 5235 1.1 christos name not_gr mode op ope regtype attr profile comment) 5236 1.1 christos (dni name 5237 1.1 christos (comment) 5238 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) 5239 1.1 christos (FR400-MAJOR I-2) (FR450-MAJOR I-2) CONDITIONAL attr) 5240 1.1 christos (.str name "$pack @($GRi,$GRj),$" regtype "doublek,$CCi,$cond") 5241 1.1 christos (+ pack (.sym regtype doublek) op GRi CCi cond ope GRj) 5242 1.1 christos (if (eq CCi (or cond 2)) 5243 1.1 christos (sequence ((WI address)) 5244 1.1 christos (load-double-semantics not_gr mode regtype address GRj))) 5245 1.1 christos profile 5246 1.1 christos ) 5247 1.1 christos ) 5248 1.1 christos 5249 1.1 christos (conditional-load-double cldd 0 DI OP_5F OPE4_1 GR NA 5250 1.1 christos ((fr400 (unit u-gr-load)) (fr450 (unit u-gr-load)) 5251 1.1 christos (fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) 5252 1.1 christos "Load double word") 5253 1.1 christos (conditional-load-double clddf 1 DF OP_60 OPE4_3 FR FR-ACCESS 5254 1.1 christos ((fr400 (unit u-gr-load)) (fr450 (unit u-gr-load)) 5255 1.1 christos (fr500 (unit u-gr-load)) (fr550 (unit u-fr-load))) 5256 1.1 christos "Load double float") 5257 1.1 christos 5258 1.1 christos (dni cldq 5259 1.1 christos "conditional load quad integer" 5260 1.1 christos ((UNIT LOAD) (FR500-MAJOR I-2) (MACH frv) CONDITIONAL) 5261 1.1 christos "cldq$pack @($GRi,$GRj),$GRk,$CCi,$cond" 5262 1.1 christos (+ pack GRk OP_5F GRi CCi cond OPE4_2 GRj) 5263 1.1 christos (if (eq CCi (or cond 2)) 5264 1.1 christos (sequence ((WI address)) 5265 1.1 christos (load-quad-semantics GR address GRj))) 5266 1.1 christos ((fr500 (unit u-gr-load))) 5267 1.1 christos ) 5268 1.1 christos 5269 1.1 christos (define-pmacro (conditional-load-gr-u name mode op ope comment) 5270 1.1 christos (dni name 5271 1.1 christos (comment) 5272 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) 5273 1.1 christos (FR400-MAJOR I-2) (FR450-MAJOR I-2) CONDITIONAL) 5274 1.1 christos (.str name "$pack @($GRi,$GRj),$GRk,$CCi,$cond") 5275 1.1 christos (+ pack GRk op GRi CCi cond ope GRj) 5276 1.1 christos (if (eq CCi (or cond 2)) 5277 1.1 christos (sequence ((WI address)) 5278 1.1 christos (set address (add GRi GRj)) 5279 1.1 christos (set GRk 5280 1.1 christos (c-call mode (.str "@cpu@_read_mem_" mode) 5281 1.1 christos pc address)) 5282 1.1 christos (if (ne (index-of GRi) (index-of GRk)) 5283 1.1 christos (set GRi address)))) 5284 1.1 christos ((fr400 (unit u-gr-load)) (fr450 (unit u-gr-load)) 5285 1.1 christos (fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) 5286 1.1 christos ) 5287 1.1 christos ) 5288 1.1 christos 5289 1.1 christos (conditional-load-gr-u cldsbu QI OP_61 OPE4_0 "Load signed byte, update") 5290 1.1 christos (conditional-load-gr-u cldubu UQI OP_61 OPE4_1 "Load unsigned byte, update") 5291 1.1 christos (conditional-load-gr-u cldshu HI OP_61 OPE4_2 "Load signed half, update") 5292 1.1 christos (conditional-load-gr-u clduhu UHI OP_61 OPE4_3 "Load unsigned half, update") 5293 1.1 christos (conditional-load-gr-u cldu SI OP_62 OPE4_0 "Load word, update") 5294 1.1 christos 5295 1.1 christos (define-pmacro (conditional-load-non-gr-u name mode op ope regtype comment) 5296 1.1 christos (dni name 5297 1.1 christos (comment) 5298 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) 5299 1.1 christos (FR400-MAJOR I-2) (FR450-MAJOR I-2) CONDITIONAL FR-ACCESS) 5300 1.1 christos (.str name "$pack @($GRi,$GRj),$" regtype "k,$CCi,$cond") 5301 1.1 christos (+ pack (.sym regtype k) op GRi CCi cond ope GRj) 5302 1.1 christos (if (eq CCi (or cond 2)) 5303 1.1 christos (sequence ((WI address)) 5304 1.1 christos (set address (add GRi GRj)) 5305 1.1 christos (set (.sym regtype k) 5306 1.1 christos (c-call mode (.str "@cpu@_read_mem_" mode) 5307 1.1 christos pc address)) 5308 1.1 christos (set GRi address))) 5309 1.1 christos ((fr400 (unit u-fr-load)) (fr450 (unit u-fr-load)) 5310 1.1 christos (fr500 (unit u-fr-load)) (fr550 (unit u-fr-load))) 5311 1.1 christos ) 5312 1.1 christos ) 5313 1.1 christos 5314 1.1 christos (conditional-load-non-gr-u cldbfu UQI OP_63 OPE4_0 FRint "Load byte float, update") 5315 1.1 christos (conditional-load-non-gr-u cldhfu UHI OP_63 OPE4_1 FRint "Load half float, update") 5316 1.1 christos (conditional-load-non-gr-u cldfu SI OP_63 OPE4_2 FRint "Load word float, update") 5317 1.1 christos 5318 1.1 christos 5319 1.1 christos (dni clddu 5320 1.1 christos "Load double word, update" 5321 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) 5322 1.1 christos (FR400-MAJOR I-2) (FR450-MAJOR I-2) CONDITIONAL) 5323 1.1 christos "clddu$pack @($GRi,$GRj),$GRdoublek,$CCi,$cond" 5324 1.1 christos (+ pack GRdoublek OP_62 GRi CCi cond OPE4_1 GRj) 5325 1.1 christos (if (eq CCi (or cond 2)) 5326 1.1 christos (sequence ((WI address)) 5327 1.1 christos (load-double-semantics 0 DI GR address GRj) 5328 1.1 christos (if (ne (index-of GRi) (index-of GRdoublek)) 5329 1.1 christos (set GRi address)))) 5330 1.1 christos ((fr400 (unit u-gr-load)) (fr450 (unit u-gr-load)) 5331 1.1 christos (fr500 (unit u-gr-load)) (fr550 (unit u-gr-load))) 5332 1.1 christos ) 5333 1.1 christos 5334 1.1 christos (dni clddfu 5335 1.1 christos "Load double float, update" 5336 1.1 christos ((UNIT LOAD) (FR550-MAJOR I-3) (FR500-MAJOR I-2) 5337 1.1 christos (FR400-MAJOR I-2) (FR450-MAJOR I-2) CONDITIONAL FR-ACCESS) 5338 1.1 christos "clddfu$pack @($GRi,$GRj),$FRdoublek,$CCi,$cond" 5339 1.1 christos (+ pack FRdoublek OP_63 GRi CCi cond OPE4_3 GRj) 5340 1.1 christos (if (eq CCi (or cond 2)) 5341 1.1 christos (sequence ((WI address)) 5342 1.1 christos (load-double-semantics 1 DF FR address GRj) 5343 1.1 christos (set GRi address))) 5344 1.1 christos ((fr400 (unit u-fr-load)) (fr450 (unit u-fr-load)) 5345 1.1 christos (fr500 (unit u-fr-load)) (fr550 (unit u-fr-load))) 5346 1.1 christos ) 5347 1.1 christos 5348 1.1 christos (dni cldqu 5349 1.1 christos "conditional load quad integer and update index" 5350 1.1 christos ((UNIT LOAD) (FR500-MAJOR I-2) (MACH frv) CONDITIONAL) 5351 1.1 christos "cldqu$pack @($GRi,$GRj),$GRk,$CCi,$cond" 5352 1.1 christos (+ pack GRk OP_62 GRi CCi cond OPE4_2 GRj) 5353 1.1 christos (if (eq CCi (or cond 2)) 5354 1.1 christos (sequence ((WI address)) 5355 1.1 christos (load-quad-semantics GR address GRj) 5356 1.1 christos (if (ne (index-of GRi) (index-of GRk)) 5357 1.1 christos (set GRi address)))) 5358 1.1 christos ((fr500 (unit u-gr-load))) 5359 1.1 christos ) 5360 1.1 christos 5361 1.1 christos (define-pmacro (conditional-store name mode op ope regtype profile comment) 5362 1.1 christos (dni name 5363 1.1 christos (comment) 5364 1.1 christos ((UNIT STORE) (FR550-MAJOR I-4) (FR500-MAJOR I-3) 5365 1.1 christos (FR400-MAJOR I-3) (FR450-MAJOR I-3) CONDITIONAL) 5366 1.1 christos (.str name "$pack $" regtype "k,@($GRi,$GRj),$CCi,$cond") 5367 1.1 christos (+ pack (.sym regtype k) op GRi CCi cond ope GRj) 5368 1.1 christos (if (eq CCi (or cond 2)) 5369 1.1 christos (c-call VOID (.str "@cpu@_write_mem_" mode) 5370 1.1 christos pc (add GRi GRj) (.sym regtype k))) 5371 1.1 christos profile 5372 1.1 christos ) 5373 1.1 christos ) 5374 1.1 christos 5375 1.1 christos (conditional-store cstb QI OP_64 OPE4_0 GR 5376 1.1 christos ((fr400 (unit u-gr-store)) (fr450 (unit u-gr-store)) 5377 1.1 christos (fr500 (unit u-gr-store)) (fr550 (unit u-gr-store))) 5378 1.1 christos "Store unsigned byte") 5379 1.1 christos (conditional-store csth HI OP_64 OPE4_1 GR 5380 1.1 christos ((fr400 (unit u-gr-store)) (fr450 (unit u-gr-store)) 5381 1.1 christos (fr500 (unit u-gr-store)) (fr550 (unit u-gr-store))) 5382 1.1 christos "Store unsigned half") 5383 1.1 christos (conditional-store cst SI OP_64 OPE4_2 GR 5384 1.1 christos ((fr400 (unit u-gr-store)) (fr450 (unit u-gr-store)) 5385 1.1 christos (fr500 (unit u-gr-store)) (fr550 (unit u-gr-store))) 5386 1.1 christos "Store word") 5387 1.1 christos 5388 1.1 christos (conditional-store cstbf QI OP_66 OPE4_0 FRint 5389 1.1 christos ((fr400 (unit u-fr-store)) (fr450 (unit u-fr-store)) 5390 1.1 christos (fr500 (unit u-fr-store)) (fr550 (unit u-fr-store))) 5391 1.1 christos "Store byte float") 5392 1.1 christos (conditional-store csthf HI OP_66 OPE4_1 FRint 5393 1.1 christos ((fr400 (unit u-fr-store)) (fr450 (unit u-fr-store)) 5394 1.1 christos (fr500 (unit u-fr-store)) (fr550 (unit u-fr-store))) 5395 1.1 christos "Store half float") 5396 1.1 christos (conditional-store cstf SI OP_66 OPE4_2 FRint 5397 1.1 christos ((fr400 (unit u-fr-store)) (fr450 (unit u-fr-store)) 5398 1.1 christos (fr500 (unit u-fr-store)) (fr550 (unit u-fr-store))) 5399 1.1 christos "Store word float") 5400 1.1 christos 5401 1.1 christos (define-pmacro (conditional-store-double 5402 1.1 christos name mode op ope regtype attr profile comment) 5403 1.1 christos (dni name 5404 1.1 christos (comment) 5405 1.1 christos ((UNIT STORE) (FR550-MAJOR I-4) (FR500-MAJOR I-3) 5406 1.1 christos (FR400-MAJOR I-3) (FR450-MAJOR I-3) CONDITIONAL attr) 5407 1.1 christos (.str name "$pack $" regtype "doublek,@($GRi,$GRj),$CCi,$cond") 5408 1.1 christos (+ pack (.sym regtype doublek) op GRi CCi cond ope GRj) 5409 1.1 christos (if (eq CCi (or cond 2)) 5410 1.1 christos (sequence ((WI address)) 5411 1.1 christos (store-double-semantics mode regtype address GRj))) 5412 1.1 christos profile 5413 1.1 christos ) 5414 1.1 christos ) 5415 1.1 christos 5416 1.1 christos (conditional-store-double cstd DI OP_64 OPE4_3 GR NA 5417 1.1 christos ((fr400 (unit u-gr-store)) (fr450 (unit u-gr-store)) 5418 1.1 christos (fr500 (unit u-gr-store)) (fr550 (unit u-gr-store))) 5419 1.1 christos "Store double word") 5420 1.1 christos (conditional-store-double cstdf DF OP_66 OPE4_3 FR FR-ACCESS 5421 1.1 christos ((fr400 (unit u-fr-store)) (fr450 (unit u-fr-store)) 5422 1.1 christos (fr500 (unit u-fr-store)) (fr550 (unit u-fr-store))) 5423 1.1 christos "Store double float") 5424 1.1 christos 5425 1.1 christos (dni cstq 5426 1.1 christos "conditionally store quad word" 5427 1.1 christos ((UNIT STORE) (FR500-MAJOR I-3) (MACH frv) CONDITIONAL) 5428 1.1 christos "cstq$pack $GRk,@($GRi,$GRj),$CCi,$cond" 5429 1.1 christos (+ pack GRk OP_65 GRi CCi cond OPE4_0 GRj) 5430 1.1 christos (if (eq CCi (or cond 2)) 5431 1.1 christos (sequence ((WI address)) 5432 1.1 christos (store-quad-semantics GR address GRj))) 5433 1.1 christos ((fr500 (unit u-gr-store))) 5434 1.1 christos ) 5435 1.1 christos 5436 1.1 christos (define-pmacro (conditional-store-u 5437 1.1 christos name mode op ope regtype attr profile comment) 5438 1.1 christos (dni name 5439 1.1 christos (comment) 5440 1.1 christos ((UNIT STORE) (FR550-MAJOR I-4) (FR500-MAJOR I-3) 5441 1.1 christos (FR400-MAJOR I-3) (FR450-MAJOR I-3) CONDITIONAL attr) 5442 1.1 christos (.str name "$pack $" regtype "k,@($GRi,$GRj),$CCi,$cond") 5443 1.1 christos (+ pack (.sym regtype k) op GRi CCi cond ope GRj) 5444 1.1 christos (if (eq CCi (or cond 2)) 5445 1.1 christos (sequence ((WI address)) 5446 1.1 christos (set address (add GRi GRj)) 5447 1.1 christos (c-call VOID (.str "@cpu@_write_mem_" mode) 5448 1.1 christos pc address (.sym regtype k)) 5449 1.1 christos (set GRi address))) 5450 1.1 christos profile 5451 1.1 christos ) 5452 1.1 christos ) 5453 1.1 christos 5454 1.1 christos (conditional-store-u cstbu QI OP_67 OPE4_0 GR NA 5455 1.1 christos ((fr400 (unit u-gr-store)) (fr450 (unit u-gr-store)) 5456 1.1 christos (fr500 (unit u-gr-store)) (fr550 (unit u-gr-store))) 5457 1.1 christos "Store unsigned byte, update index") 5458 1.1 christos (conditional-store-u csthu HI OP_67 OPE4_1 GR NA 5459 1.1 christos ((fr400 (unit u-gr-store)) (fr450 (unit u-gr-store)) 5460 1.1 christos (fr500 (unit u-gr-store)) (fr550 (unit u-gr-store))) 5461 1.1 christos "Store unsigned half, update index") 5462 1.1 christos (conditional-store-u cstu SI OP_67 OPE4_2 GR NA 5463 1.1 christos ((fr400 (unit u-gr-store)) (fr450 (unit u-gr-store)) 5464 1.1 christos (fr500 (unit u-gr-store)) (fr550 (unit u-gr-store))) 5465 1.1 christos "Store word, update index") 5466 1.1 christos 5467 1.1 christos (conditional-store-u cstbfu QI OP_68 OPE4_0 FRint FR-ACCESS 5468 1.1 christos ((fr400 (unit u-fr-store)) (fr450 (unit u-fr-store)) 5469 1.1 christos (fr500 (unit u-fr-store)) (fr550 (unit u-fr-store))) 5470 1.1 christos "Store byte float, update index") 5471 1.1 christos (conditional-store-u csthfu HI OP_68 OPE4_1 FRint FR-ACCESS 5472 1.1 christos ((fr400 (unit u-fr-store)) (fr450 (unit u-fr-store)) 5473 1.1 christos (fr500 (unit u-fr-store)) (fr550 (unit u-fr-store))) 5474 1.1 christos "Store half float, update index") 5475 1.1 christos (conditional-store-u cstfu SI OP_68 OPE4_2 FRint FR-ACCESS 5476 1.1 christos ((fr400 (unit u-fr-store)) (fr450 (unit u-fr-store)) 5477 1.1 christos (fr500 (unit u-fr-store)) (fr550 (unit u-fr-store))) 5478 1.1 christos "Store word float, update index") 5479 1.1 christos 5480 1.1 christos (define-pmacro (conditional-store-double-u 5481 1.1 christos name mode op ope regtype attr profile comment) 5482 1.1 christos (dni name 5483 1.1 christos (comment) 5484 1.1 christos ((UNIT STORE) (FR550-MAJOR I-4) (FR500-MAJOR I-3) 5485 1.1 christos (FR400-MAJOR I-3) (FR450-MAJOR I-3) CONDITIONAL attr) 5486 1.1 christos (.str name "$pack $" regtype "doublek,@($GRi,$GRj),$CCi,$cond") 5487 1.1 christos (+ pack (.sym regtype doublek) op GRi CCi cond ope GRj) 5488 1.1 christos (if (eq CCi (or cond 2)) 5489 1.1 christos (sequence ((WI address)) 5490 1.1 christos (store-double-semantics mode regtype address GRj) 5491 1.1 christos (set GRi address))) 5492 1.1 christos profile 5493 1.1 christos ) 5494 1.1 christos ) 5495 1.1 christos 5496 1.1 christos (conditional-store-double-u cstdu DI OP_67 OPE4_3 GR NA 5497 1.1 christos ((fr400 (unit u-gr-store)) (fr450 (unit u-gr-store)) 5498 1.1 christos (fr500 (unit u-gr-store)) (fr550 (unit u-gr-store))) 5499 1.1 christos "Store double word, update index") 5500 1.1 christos (conditional-store-double-u cstdfu DF OP_68 OPE4_3 FR FR-ACCESS 5501 1.1 christos ((fr400 (unit u-fr-store)) (fr450 (unit u-fr-store)) 5502 1.1 christos (fr500 (unit u-fr-store)) (fr550 (unit u-fr-store))) 5503 1.1 christos "Store double float, update index") 5504 1.1 christos 5505 1.1 christos (define-pmacro (store-r-simm name mode op regtype attr profile comment) 5506 1.1 christos (dni name 5507 1.1 christos (comment) 5508 1.1 christos ((UNIT STORE) (FR550-MAJOR I-4) (FR500-MAJOR I-3) 5509 1.1 christos (FR400-MAJOR I-3) (FR450-MAJOR I-3) attr) 5510 1.1 christos (.str name "$pack $" regtype "k,@($GRi,$d12)") 5511 1.1 christos (+ pack (.sym regtype k) op GRi d12) 5512 1.1 christos (c-call VOID (.str "@cpu@_write_mem_" mode) 5513 1.1 christos pc (add GRi d12) (.sym regtype k)) 5514 1.1 christos profile 5515 1.1 christos ) 5516 1.1 christos ) 5517 1.1 christos 5518 1.1 christos (store-r-simm stbi QI OP_50 GR NA 5519 1.1 christos ((fr400 (unit u-gr-store)) (fr450 (unit u-gr-store)) 5520 1.1 christos (fr500 (unit u-gr-store)) (fr550 (unit u-gr-store))) 5521 1.1 christos "Store unsigned byte") 5522 1.1 christos (store-r-simm sthi HI OP_51 GR NA 5523 1.1 christos ((fr400 (unit u-gr-store)) (fr450 (unit u-gr-store)) 5524 1.1 christos (fr500 (unit u-gr-store)) (fr550 (unit u-gr-store))) 5525 1.1 christos "Store unsigned half") 5526 1.1 christos (store-r-simm sti SI OP_52 GR NA 5527 1.1 christos ((fr400 (unit u-gr-store)) (fr450 (unit u-gr-store)) 5528 1.1 christos (fr500 (unit u-gr-store)) (fr550 (unit u-gr-store))) 5529 1.1 christos "Store word") 5530 1.1 christos 5531 1.1 christos (store-r-simm stbfi QI OP_4E FRint FR-ACCESS 5532 1.1 christos ((fr400 (unit u-fr-store)) (fr450 (unit u-fr-store)) 5533 1.1 christos (fr500 (unit u-fr-store)) (fr550 (unit u-fr-store))) 5534 1.1 christos "Store byte float") 5535 1.1 christos (store-r-simm sthfi HI OP_4F FRint FR-ACCESS 5536 1.1 christos ((fr400 (unit u-fr-store)) (fr450 (unit u-fr-store)) 5537 1.1 christos (fr500 (unit u-fr-store)) (fr550 (unit u-fr-store))) 5538 1.1 christos "Store half float") 5539 1.1 christos (store-r-simm stfi SI OP_55 FRint FR-ACCESS 5540 1.1 christos ((fr400 (unit u-fr-store)) (fr450 (unit u-fr-store)) 5541 1.1 christos (fr500 (unit u-fr-store)) (fr550 (unit u-fr-store))) 5542 1.1 christos "Store word float") 5543 1.1 christos 5544 1.1 christos (define-pmacro (store-double-r-simm name mode op regtype attr profile comment) 5545 1.1 christos (dni name 5546 1.1 christos (comment) 5547 1.1 christos ((UNIT STORE) (FR550-MAJOR I-4) (FR500-MAJOR I-3) 5548 1.1 christos (FR400-MAJOR I-3) (FR450-MAJOR I-3) attr) 5549 1.1 christos (.str name "$pack $" regtype "doublek,@($GRi,$d12)") 5550 1.1 christos (+ pack (.sym regtype doublek) op GRi d12) 5551 1.1 christos (sequence ((WI address)) 5552 1.1 christos (store-double-semantics mode regtype address d12)) 5553 1.1 christos profile 5554 1.1 christos ) 5555 1.1 christos ) 5556 1.1 christos 5557 1.1 christos (store-double-r-simm stdi DI OP_53 GR NA 5558 1.1 christos ((fr400 (unit u-gr-store)) (fr450 (unit u-gr-store)) 5559 1.1 christos (fr500 (unit u-gr-store)) (fr550 (unit u-gr-store))) 5560 1.1 christos "Store double word") 5561 1.1 christos (store-double-r-simm stdfi DF OP_56 FR FR-ACCESS 5562 1.1 christos ((fr400 (unit u-fr-store)) (fr450 (unit u-fr-store)) 5563 1.1 christos (fr500 (unit u-fr-store)) (fr550 (unit u-fr-store))) 5564 1.1 christos "Store double float") 5565 1.1 christos 5566 1.1 christos (define-pmacro (store-quad-r-simm name op regtype attr profile comment) 5567 1.1 christos (dni name 5568 1.1 christos (comment) 5569 1.1 christos ((UNIT STORE) (FR500-MAJOR I-3) (MACH frv) attr) 5570 1.1 christos (.str name "$pack $" regtype "k,@($GRi,$d12)") 5571 1.1 christos (+ pack (.sym regtype k) op GRi d12) 5572 1.1 christos (sequence ((WI address)) 5573 1.1 christos (store-quad-semantics regtype address d12)) 5574 1.1 christos profile 5575 1.1 christos ) 5576 1.1 christos ) 5577 1.1 christos 5578 1.1 christos (store-quad-r-simm stqi OP_54 GR NA ((fr500 (unit u-gr-store))) 5579 1.1 christos "Store quad word") 5580 1.1 christos (store-quad-r-simm stqfi OP_57 FRint FR-ACCESS () 5581 1.1 christos "Store quad float") 5582 1.1 christos 5583 1.1 christos (define-pmacro (swap-semantics base offset arg) 5584 1.1 christos (sequence ((WI tmp) (WI address)) 5585 1.1 christos (set tmp arg) 5586 1.1 christos (set address (add base offset)) 5587 1.1 christos (c-call VOID "@cpu@_check_swap_address" address) 5588 1.1 christos (set arg (c-call WI "@cpu@_read_mem_WI" pc address)) 5589 1.1 christos (c-call VOID "@cpu@_write_mem_WI" pc address tmp)) 5590 1.1 christos ) 5591 1.1 christos 5592 1.1 christos (dni swap 5593 1.1 christos "Swap contents of memory with GR" 5594 1.1 christos ((UNIT C) (FR500-MAJOR C-2) (FR550-MAJOR C-2) 5595 1.1 christos (FR400-MAJOR C-2) (FR450-MAJOR C-2)) 5596 1.1 christos "swap$pack @($GRi,$GRj),$GRk" 5597 1.1 christos (+ pack GRk OP_03 GRi OPE1_05 GRj) 5598 1.1 christos (swap-semantics GRi GRj GRk) 5599 1.1 christos ((fr400 (unit u-swap)) (fr450 (unit u-swap)) 5600 1.1 christos (fr500 (unit u-swap)) (fr550 (unit u-swap))) 5601 1.1 christos ) 5602 1.1 christos 5603 1.1 christos (dni "swapi" 5604 1.1 christos "Swap contents of memory with GR" 5605 1.1 christos ((UNIT C) (FR500-MAJOR C-2) (FR550-MAJOR C-2) 5606 1.1 christos (FR400-MAJOR C-2) (FR450-MAJOR C-2)) 5607 1.1 christos ("swapi$pack @($GRi,$d12),$GRk") 5608 1.1 christos (+ pack GRk OP_4D GRi d12) 5609 1.1 christos (swap-semantics GRi d12 GRk) 5610 1.1 christos ((fr400 (unit u-swap)) (fr450 (unit u-swap)) 5611 1.1 christos (fr500 (unit u-swap)) (fr550 (unit u-swap))) 5612 1.1 christos ) 5613 1.1 christos 5614 1.1 christos (dni cswap 5615 1.1 christos "Conditionally swap contents of memory with GR" 5616 1.1 christos ((UNIT C) (FR500-MAJOR C-2) (FR550-MAJOR C-2) 5617 1.1 christos (FR400-MAJOR C-2) (FR450-MAJOR C-2) CONDITIONAL) 5618 1.1 christos "cswap$pack @($GRi,$GRj),$GRk,$CCi,$cond" 5619 1.1 christos (+ pack GRk OP_65 GRi CCi cond OPE4_2 GRj) 5620 1.1 christos (if (eq CCi (or cond 2)) 5621 1.1 christos (swap-semantics GRi GRj GRk)) 5622 1.1 christos ((fr400 (unit u-swap)) (fr450 (unit u-swap)) 5623 1.1 christos (fr500 (unit u-swap)) (fr550 (unit u-swap))) 5624 1.1 christos ) 5625 1.1 christos 5626 1.1 christos (define-pmacro (register-transfer 5627 1.1 christos name op ope reg_src reg_targ pipe attrs profile comment) 5628 1.1 christos (dni name 5629 1.1 christos (comment) 5630 1.1 christos (.splice (UNIT pipe) (.unsplice attrs)) 5631 1.1 christos (.str name "$pack $" reg_src ",$" reg_targ) 5632 1.1 christos (+ pack reg_targ op (rs-null) ope reg_src) 5633 1.1 christos (set reg_targ reg_src) 5634 1.1 christos profile 5635 1.1 christos ) 5636 1.1 christos ) 5637 1.1 christos 5638 1.1 christos (register-transfer movgf OP_03 OPE1_15 5639 1.1 christos GRj FRintk I0 5640 1.1 christos ((FR500-MAJOR I-4) (FR550-MAJOR I-5) 5641 1.1 christos (FR400-MAJOR I-4) (FR450-MAJOR I-4) FR-ACCESS) 5642 1.1 christos ((fr400 (unit u-gr2fr)) (fr450 (unit u-gr2fr)) 5643 1.1 christos (fr500 (unit u-gr2fr)) (fr550 (unit u-gr2fr))) 5644 1.1 christos "transfer gr to fr") 5645 1.1 christos (register-transfer movfg OP_03 OPE1_0D 5646 1.1 christos FRintk GRj I0 5647 1.1 christos ((FR500-MAJOR I-4) (FR550-MAJOR I-5) 5648 1.1 christos (FR400-MAJOR I-4) (FR450-MAJOR I-4) FR-ACCESS) 5649 1.1 christos ((fr400 (unit u-fr2gr)) (fr450 (unit u-fr2gr)) 5650 1.1 christos (fr500 (unit u-fr2gr)) (fr550 (unit u-fr2gr))) 5651 1.1 christos "transfer fr to gr") 5652 1.1 christos 5653 1.1 christos (define-pmacro (nextreg hw r offset) (reg hw (add (index-of r) offset))) 5654 1.1 christos 5655 1.1 christos (define-pmacro (register-transfer-double-from-gr-semantics cond) 5656 1.1 christos (if cond 5657 1.1 christos (if (eq (index-of GRj) 0) 5658 1.1 christos (sequence () 5659 1.1 christos (set FRintk 0) 5660 1.1 christos (set (nextreg h-fr_int FRintk 1) 0)) 5661 1.1 christos (sequence () 5662 1.1 christos (set FRintk GRj) 5663 1.1 christos (set (nextreg h-fr_int FRintk 1) (nextreg h-gr GRj 1))))) 5664 1.1 christos ) 5665 1.1 christos 5666 1.1 christos (dni movgfd 5667 1.1 christos "move GR for FR double" 5668 1.1 christos ((UNIT I0) (FR500-MAJOR I-4) (FR550-MAJOR I-5) 5669 1.1 christos (FR400-MAJOR I-4) (FR450-MAJOR I-4) FR-ACCESS) 5670 1.1 christos "movgfd$pack $GRj,$FRintk" 5671 1.1 christos (+ pack FRintk OP_03 (rs-null) OPE1_16 GRj) 5672 1.1 christos (register-transfer-double-from-gr-semantics 1) 5673 1.1 christos ; TODO -- doesn't handle second register in the pair 5674 1.1 christos ((fr400 (unit u-gr2fr)) (fr450 (unit u-gr2fr)) 5675 1.1 christos (fr500 (unit u-gr2fr)) (fr550 (unit u-gr2fr))) 5676 1.1 christos ) 5677 1.1 christos 5678 1.1 christos (define-pmacro (register-transfer-double-to-gr-semantics cond) 5679 1.1 christos (if (andif (ne (index-of GRj) 0) cond) 5680 1.1 christos (sequence () 5681 1.1 christos (set GRj FRintk) 5682 1.1 christos (set (nextreg h-gr GRj 1) (nextreg h-fr_int FRintk 1)))) 5683 1.1 christos ) 5684 1.1 christos 5685 1.1 christos (dni movfgd 5686 1.1 christos "move FR for GR double" 5687 1.1 christos ((UNIT I0) (FR500-MAJOR I-4) (FR550-MAJOR I-5) 5688 1.1 christos (FR400-MAJOR I-4) (FR450-MAJOR I-4) FR-ACCESS) 5689 1.1 christos "movfgd$pack $FRintk,$GRj" 5690 1.1 christos (+ pack FRintk OP_03 (rs-null) OPE1_0E GRj) 5691 1.1 christos (register-transfer-double-to-gr-semantics 1) 5692 1.1 christos ; TODO -- doesn't handle second register in the pair 5693 1.1 christos ((fr400 (unit u-fr2gr)) (fr450 (unit u-fr2gr)) 5694 1.1 christos (fr500 (unit u-fr2gr)) (fr550 (unit u-fr2gr))) 5695 1.1 christos ) 5696 1.1 christos 5697 1.1 christos (dni movgfq 5698 1.1 christos "move GR for FR quad" 5699 1.1 christos ((UNIT I0) (FR500-MAJOR I-4) (MACH frv) FR-ACCESS) 5700 1.1 christos "movgfq$pack $GRj,$FRintk" 5701 1.1 christos (+ pack FRintk OP_03 (rs-null) OPE1_17 GRj) 5702 1.1 christos (if (eq (index-of GRj) 0) 5703 1.1 christos (sequence () 5704 1.1 christos (set FRintk 0) 5705 1.1 christos (set (reg h-fr_int (add (index-of FRintk) 1)) 0) 5706 1.1 christos (set (reg h-fr_int (add (index-of FRintk) 2)) 0) 5707 1.1 christos (set (reg h-fr_int (add (index-of FRintk) 3)) 0)) 5708 1.1 christos (sequence () 5709 1.1 christos (set FRintk GRj) 5710 1.1 christos (set (reg h-fr_int (add (index-of FRintk) 1)) 5711 1.1 christos (reg h-gr (add (index-of GRj) 1))) 5712 1.1 christos (set (reg h-fr_int (add (index-of FRintk) 2)) 5713 1.1 christos (reg h-gr (add (index-of GRj) 2))) 5714 1.1 christos (set (reg h-fr_int (add (index-of FRintk) 3)) 5715 1.1 christos (reg h-gr (add (index-of GRj) 3))))) 5716 1.1 christos () 5717 1.1 christos ) 5718 1.1 christos 5719 1.1 christos (dni movfgq 5720 1.1 christos "move FR for GR quad" 5721 1.1 christos ((UNIT I0) (FR500-MAJOR I-4) (MACH frv) FR-ACCESS) 5722 1.1 christos "movfgq$pack $FRintk,$GRj" 5723 1.1 christos (+ pack FRintk OP_03 (rs-null) OPE1_0F GRj) 5724 1.1 christos (if (ne (index-of GRj) 0) 5725 1.1 christos (sequence () 5726 1.1 christos (set GRj FRintk) 5727 1.1 christos (set (reg h-gr (add (index-of GRj) 1)) 5728 1.1 christos (reg h-fr_int (add (index-of FRintk) 1))) 5729 1.1 christos (set (reg h-gr (add (index-of GRj) 2)) 5730 1.1 christos (reg h-fr_int (add (index-of FRintk) 2))) 5731 1.1 christos (set (reg h-gr (add (index-of GRj) 3)) 5732 1.1 christos (reg h-fr_int (add (index-of FRintk) 3))))) 5733 1.1 christos () 5734 1.1 christos ) 5735 1.1 christos 5736 1.1 christos (define-pmacro (conditional-register-transfer 5737 1.1 christos name op ope reg_src reg_targ pipe attrs profile comment) 5738 1.1 christos (dni name 5739 1.1 christos (comment) 5740 1.1 christos (.splice (UNIT pipe) CONDITIONAL FR-ACCESS (.unsplice attrs)) 5741 1.1 christos (.str name "$pack $" reg_src ",$" reg_targ ",$CCi,$cond") 5742 1.1 christos (+ pack reg_targ op (rs-null) CCi cond ope reg_src) 5743 1.1 christos (if (eq CCi (or cond 2)) 5744 1.1 christos (set reg_targ reg_src)) 5745 1.1 christos profile 5746 1.1 christos ) 5747 1.1 christos ) 5748 1.1 christos 5749 1.1 christos (conditional-register-transfer cmovgf OP_69 OPE4_0 GRj FRintk I0 5750 1.1 christos ((FR500-MAJOR I-4) (FR550-MAJOR I-5) 5751 1.1 christos (FR400-MAJOR I-4) (FR450-MAJOR I-4)) 5752 1.1 christos ((fr400 (unit u-gr2fr)) (fr450 (unit u-gr2fr)) 5753 1.1 christos (fr500 (unit u-gr2fr)) (fr550 (unit u-gr2fr))) 5754 1.1 christos "transfer gr to fr") 5755 1.1 christos (conditional-register-transfer cmovfg OP_69 OPE4_2 FRintk GRj I0 5756 1.1 christos ((FR500-MAJOR I-4) (FR550-MAJOR I-5) 5757 1.1 christos (FR400-MAJOR I-4) (FR450-MAJOR I-4)) 5758 1.1 christos ((fr400 (unit u-fr2gr)) (fr450 (unit u-fr2gr)) 5759 1.1 christos (fr500 (unit u-fr2gr)) (fr550 (unit u-fr2gr))) 5760 1.1 christos "transfer fr to gr") 5761 1.1 christos 5762 1.1 christos 5763 1.1 christos (dni cmovgfd 5764 1.1 christos "Conditional move GR to FR double" 5765 1.1 christos ((UNIT I0) (FR500-MAJOR I-4) (FR550-MAJOR I-5) 5766 1.1 christos (FR400-MAJOR I-4) (FR450-MAJOR I-4) CONDITIONAL FR-ACCESS) 5767 1.1 christos "cmovgfd$pack $GRj,$FRintk,$CCi,$cond" 5768 1.1 christos (+ pack FRintk OP_69 (rs-null) CCi cond OPE4_1 GRj) 5769 1.1 christos (register-transfer-double-from-gr-semantics (eq CCi (or cond 2))) 5770 1.1 christos ; TODO -- doesn't handle extra registers in double 5771 1.1 christos ((fr400 (unit u-gr2fr)) (fr450 (unit u-gr2fr)) 5772 1.1 christos (fr500 (unit u-gr2fr)) (fr550 (unit u-gr2fr))) 5773 1.1 christos ) 5774 1.1 christos 5775 1.1 christos (dni cmovfgd 5776 1.1 christos "Conditional move FR to GR double" 5777 1.1 christos ((UNIT I0) (FR500-MAJOR I-4) (FR550-MAJOR I-5) 5778 1.1 christos (FR400-MAJOR I-4) (FR450-MAJOR I-4) CONDITIONAL FR-ACCESS) 5779 1.1 christos "cmovfgd$pack $FRintk,$GRj,$CCi,$cond" 5780 1.1 christos (+ pack FRintk OP_69 (rs-null) CCi cond OPE4_3 GRj) 5781 1.1 christos (register-transfer-double-to-gr-semantics (eq CCi (or cond 2))) 5782 1.1 christos ; TODO -- doesn't handle second register in the pair 5783 1.1 christos ((fr400 (unit u-fr2gr)) (fr450 (unit u-fr2gr)) 5784 1.1 christos (fr500 (unit u-fr2gr)) (fr550 (unit u-fr2gr))) 5785 1.1 christos ) 5786 1.1 christos 5787 1.1 christos (define-pmacro (register-transfer-spr 5788 1.1 christos name op ope reg_src reg_targ unitname comment) 5789 1.1 christos (dni name 5790 1.1 christos (comment) 5791 1.1 christos ((UNIT C) (FR500-MAJOR C-2) (FR550-MAJOR C-2) 5792 1.1 christos (FR400-MAJOR C-2) (FR450-MAJOR C-2)) 5793 1.1 christos (.str name "$pack $" reg_src ",$" reg_targ) 5794 1.1 christos (+ pack reg_targ op ope reg_src) 5795 1.1 christos (set reg_targ reg_src) 5796 1.1 christos ((fr400 (unit unitname)) (fr450 (unit unitname)) 5797 1.1 christos (fr500 (unit unitname)) (fr550 (unit unitname))) 5798 1.1 christos ) 5799 1.1 christos ) 5800 1.1 christos 5801 1.1 christos (register-transfer-spr movgs OP_03 OPE1_06 GRj spr u-gr2spr "transfer gr->spr") 5802 1.1 christos (register-transfer-spr movsg OP_03 OPE1_07 spr GRj u-spr2gr "transfer spr->gr") 5803 1.1 christos 5804 1.1 christos ; Integer Branch Conditions 5805 1.1 christos (define-pmacro (Inev cc) (const BI 0)) 5806 1.1 christos (define-pmacro (Ira cc) (const BI 1)) 5807 1.1 christos (define-pmacro (Ieq cc) ( zbit cc)) 5808 1.1 christos (define-pmacro (Ine cc) (not (zbit cc))) 5809 1.1 christos (define-pmacro (Ile cc) ( orif (zbit cc) (xor (nbit cc) (vbit cc)))) 5810 1.1 christos (define-pmacro (Igt cc) (not (orif (zbit cc) (xor (nbit cc) (vbit cc))))) 5811 1.1 christos (define-pmacro (Ilt cc) ( xor (nbit cc) (vbit cc))) 5812 1.1 christos (define-pmacro (Ige cc) (not (xor (nbit cc) (vbit cc)))) 5813 1.1 christos (define-pmacro (Ils cc) ( orif (cbit cc) (zbit cc))) 5814 1.1 christos (define-pmacro (Ihi cc) (not (orif (cbit cc) (zbit cc)))) 5815 1.1 christos (define-pmacro (Ic cc) ( cbit cc)) 5816 1.1 christos (define-pmacro (Inc cc) (not (cbit cc))) 5817 1.1 christos (define-pmacro (In cc) ( nbit cc)) 5818 1.1 christos (define-pmacro (Ip cc) (not (nbit cc))) 5819 1.1 christos (define-pmacro (Iv cc) ( vbit cc)) 5820 1.1 christos (define-pmacro (Inv cc) (not (vbit cc))) 5821 1.1 christos 5822 1.1 christos ; Float Branch Conditions 5823 1.1 christos (define-pmacro (Fnev cc) (const BI 0)) 5824 1.1 christos (define-pmacro (Fra cc) (const BI 1)) 5825 1.1 christos (define-pmacro (Fne cc) (orif (lbit cc) (orif (gbit cc) (ubit cc)))) 5826 1.1 christos (define-pmacro (Feq cc) (ebit cc)) 5827 1.1 christos (define-pmacro (Flg cc) (orif (lbit cc) (gbit cc))) 5828 1.1 christos (define-pmacro (Fue cc) (orif (ebit cc) (ubit cc))) 5829 1.1 christos (define-pmacro (Ful cc) (orif (lbit cc) (ubit cc))) 5830 1.1 christos (define-pmacro (Fge cc) (orif (ebit cc) (gbit cc))) 5831 1.1 christos (define-pmacro (Flt cc) (lbit cc)) 5832 1.1 christos (define-pmacro (Fuge cc) (orif (ebit cc) (orif (gbit cc) (ubit cc)))) 5833 1.1 christos (define-pmacro (Fug cc) (orif (gbit cc) (ubit cc))) 5834 1.1 christos (define-pmacro (Fle cc) (orif (ebit cc) (lbit cc))) 5835 1.1 christos (define-pmacro (Fgt cc) (gbit cc)) 5836 1.1 christos (define-pmacro (Fule cc) (orif (ebit cc) (orif (lbit cc) (ubit cc)))) 5837 1.1 christos (define-pmacro (Fu cc) (ubit cc)) 5838 1.1 christos (define-pmacro (Fo cc) (orif (ebit cc) (orif (lbit cc) (gbit cc)))) 5839 1.1 christos 5840 1.1 christos (define-pmacro (conditional-branch-i prefix cc op cond comment) 5841 1.1 christos (dni (.sym prefix cc) 5842 1.1 christos (comment) 5843 1.1 christos ((UNIT B01) (FR500-MAJOR B-1) (FR550-MAJOR B-1) 5844 1.1 christos (FR400-MAJOR B-1) (FR450-MAJOR B-1)) 5845 1.1 christos (.str (.sym prefix cc) "$pack $ICCi_2,$hint,$label16") 5846 1.1 christos (+ pack (.sym ICC_ cc) ICCi_2 op hint label16) 5847 1.1 christos (sequence () 5848 1.1 christos (c-call VOID "@cpu@_model_branch" label16 hint) 5849 1.1 christos (if (cond ICCi_2) 5850 1.1 christos (set pc label16))) 5851 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 5852 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 5853 1.1 christos ) 5854 1.1 christos ) 5855 1.1 christos 5856 1.1 christos (dni bra 5857 1.1 christos "integer branch equal" 5858 1.1 christos ((UNIT B01) (FR500-MAJOR B-1) (FR550-MAJOR B-1) 5859 1.1 christos (FR400-MAJOR B-1) (FR450-MAJOR B-1)) 5860 1.1 christos "bra$pack $hint_taken$label16" 5861 1.1 christos (+ pack ICC_ra (ICCi_2-null) OP_06 hint_taken label16) 5862 1.1 christos (sequence () 5863 1.1 christos (c-call VOID "@cpu@_model_branch" label16 hint_taken) 5864 1.1 christos (set pc label16)) 5865 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 5866 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 5867 1.1 christos ) 5868 1.1 christos 5869 1.1 christos (dni bno 5870 1.1 christos "integer branch never" 5871 1.1 christos ((UNIT B01) (FR500-MAJOR B-1) (FR550-MAJOR B-1) 5872 1.1 christos (FR400-MAJOR B-1) (FR450-MAJOR B-1)) 5873 1.1 christos "bno$pack$hint_not_taken" 5874 1.1 christos (+ pack ICC_nev (ICCi_2-null) OP_06 hint_not_taken (label16-null)) 5875 1.1 christos (c-call VOID "@cpu@_model_branch" label16 hint_not_taken) 5876 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 5877 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 5878 1.1 christos ) 5879 1.1 christos 5880 1.1 christos (conditional-branch-i b eq OP_06 Ieq "integer branch equal") 5881 1.1 christos (conditional-branch-i b ne OP_06 Ine "integer branch not equal") 5882 1.1 christos (conditional-branch-i b le OP_06 Ile "integer branch less or equal") 5883 1.1 christos (conditional-branch-i b gt OP_06 Igt "integer branch greater") 5884 1.1 christos (conditional-branch-i b lt OP_06 Ilt "integer branch less") 5885 1.1 christos (conditional-branch-i b ge OP_06 Ige "integer branch greater or equal") 5886 1.1 christos (conditional-branch-i b ls OP_06 Ils "integer branch less or equal unsigned") 5887 1.1 christos (conditional-branch-i b hi OP_06 Ihi "integer branch greater unsigned") 5888 1.1 christos (conditional-branch-i b c OP_06 Ic "integer branch carry set") 5889 1.1 christos (conditional-branch-i b nc OP_06 Inc "integer branch carry clear") 5890 1.1 christos (conditional-branch-i b n OP_06 In "integer branch negative") 5891 1.1 christos (conditional-branch-i b p OP_06 Ip "integer branch positive") 5892 1.1 christos (conditional-branch-i b v OP_06 Iv "integer branch overflow set") 5893 1.1 christos (conditional-branch-i b nv OP_06 Inv "integer branch overflow clear") 5894 1.1 christos 5895 1.1 christos (define-pmacro (conditional-branch-f prefix cc op cond comment) 5896 1.1 christos (dni (.sym prefix cc) 5897 1.1 christos (comment) 5898 1.1 christos ((UNIT B01) (FR500-MAJOR B-1) (FR550-MAJOR B-1) 5899 1.1 christos (FR400-MAJOR B-1) (FR450-MAJOR B-1) FR-ACCESS) 5900 1.1 christos (.str (.sym prefix cc) "$pack $FCCi_2,$hint,$label16") 5901 1.1 christos (+ pack (.sym FCC_ cc) FCCi_2 op hint label16) 5902 1.1 christos (sequence () 5903 1.1 christos (c-call VOID "@cpu@_model_branch" label16 hint) 5904 1.1 christos (if (cond FCCi_2) (set pc label16))) 5905 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 5906 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 5907 1.1 christos ) 5908 1.1 christos ) 5909 1.1 christos 5910 1.1 christos (dni fbra 5911 1.1 christos "float branch equal" 5912 1.1 christos ((UNIT B01) (FR500-MAJOR B-1) (FR550-MAJOR B-1) 5913 1.1 christos (FR400-MAJOR B-1) (FR450-MAJOR B-1) FR-ACCESS) 5914 1.1 christos "fbra$pack $hint_taken$label16" 5915 1.1 christos (+ pack FCC_ra (FCCi_2-null) OP_07 hint_taken label16) 5916 1.1 christos (sequence () 5917 1.1 christos (c-call VOID "@cpu@_model_branch" label16 hint_taken) 5918 1.1 christos (set pc label16)) 5919 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 5920 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 5921 1.1 christos ) 5922 1.1 christos 5923 1.1 christos (dni fbno 5924 1.1 christos "float branch never" 5925 1.1 christos ((UNIT B01) (FR500-MAJOR B-1) (FR550-MAJOR B-1) 5926 1.1 christos (FR400-MAJOR B-1) (FR450-MAJOR B-1) FR-ACCESS) 5927 1.1 christos "fbno$pack$hint_not_taken" 5928 1.1 christos (+ pack FCC_nev (FCCi_2-null) OP_07 hint_not_taken (label16-null)) 5929 1.1 christos (c-call VOID "@cpu@_model_branch" label16 hint_not_taken) 5930 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 5931 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 5932 1.1 christos ) 5933 1.1 christos 5934 1.1 christos (conditional-branch-f fb ne OP_07 Fne "float branch not equal") 5935 1.1 christos (conditional-branch-f fb eq OP_07 Feq "float branch equal") 5936 1.1 christos (conditional-branch-f fb lg OP_07 Flg "float branch less or greater") 5937 1.1 christos (conditional-branch-f fb ue OP_07 Fue "float branch unordered or equal") 5938 1.1 christos (conditional-branch-f fb ul OP_07 Ful "float branch unordered or less") 5939 1.1 christos (conditional-branch-f fb ge OP_07 Fge "float branch greater or equal") 5940 1.1 christos (conditional-branch-f fb lt OP_07 Flt "float branch less") 5941 1.1 christos (conditional-branch-f fb uge OP_07 Fuge "float branch unordered, greater,equal") 5942 1.1 christos (conditional-branch-f fb ug OP_07 Fug "float branch unordered or greater") 5943 1.1 christos (conditional-branch-f fb le OP_07 Fle "float branch less or equal") 5944 1.1 christos (conditional-branch-f fb gt OP_07 Fgt "float branch greater") 5945 1.1 christos (conditional-branch-f fb ule OP_07 Fule "float branch unordered, less or equal") 5946 1.1 christos (conditional-branch-f fb u OP_07 Fu "float branch unordered") 5947 1.1 christos (conditional-branch-f fb o OP_07 Fo "float branch ordered") 5948 1.1 christos 5949 1.1 christos (define-pmacro (ctrlr-branch-semantics cond ccond) 5950 1.1 christos (sequence ((SI tmp)) 5951 1.1 christos (set tmp (sub (spr-lcr) 1)) 5952 1.1 christos (set (spr-lcr) tmp) 5953 1.1 christos (if cond 5954 1.1 christos (if (eq ccond 0) 5955 1.1 christos (if (ne tmp 0) 5956 1.1 christos (set pc (spr-lr))) 5957 1.1 christos (if (eq tmp 0) 5958 1.1 christos (set pc (spr-lr)))))) 5959 1.1 christos ) 5960 1.1 christos 5961 1.1 christos (dni bctrlr 5962 1.1 christos "LCR conditional branch to lr" 5963 1.1 christos ((UNIT B0) (FR500-MAJOR B-2) (FR550-MAJOR B-2) 5964 1.1 christos (FR400-MAJOR B-2) (FR450-MAJOR B-2)) 5965 1.1 christos ("bctrlr$pack $ccond,$hint") 5966 1.1 christos (+ pack (cond-null) (ICCi_2-null) OP_0E hint OPE3_01 ccond (s12-null)) 5967 1.1 christos (sequence () 5968 1.1 christos (c-call VOID "@cpu@_model_branch" (spr-lr) hint) 5969 1.1 christos (ctrlr-branch-semantics (const BI 1) ccond)) 5970 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 5971 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 5972 1.1 christos ) 5973 1.1 christos 5974 1.1 christos (define-pmacro (conditional-branch-cclr prefix cc i-f op ope cond attr comment) 5975 1.1 christos (dni (.sym prefix cc lr) 5976 1.1 christos (comment) 5977 1.1 christos ((UNIT B01) (FR500-MAJOR B-3) (FR550-MAJOR B-3) 5978 1.1 christos (FR400-MAJOR B-3) (FR450-MAJOR B-3) attr) 5979 1.1 christos (.str (.sym prefix cc lr) "$pack $" i-f "CCi_2,$hint") 5980 1.1 christos (+ pack (.sym i-f CC_ cc) (.sym i-f CCi_2) op hint ope 5981 1.1 christos (ccond-null) (s12-null)) 5982 1.1 christos (sequence () 5983 1.1 christos (c-call VOID "@cpu@_model_branch" (spr-lr) hint) 5984 1.1 christos (if (cond (.sym i-f CCi_2)) (set pc (spr-lr)))) 5985 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 5986 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 5987 1.1 christos ) 5988 1.1 christos ) 5989 1.1 christos 5990 1.1 christos (dni bralr 5991 1.1 christos "integer cclr branch always" 5992 1.1 christos ((UNIT B01) (FR500-MAJOR B-3) (FR550-MAJOR B-3) 5993 1.1 christos (FR400-MAJOR B-3) (FR450-MAJOR B-3)) 5994 1.1 christos "bralr$pack$hint_taken" 5995 1.1 christos (+ pack ICC_ra (ICCi_2-null) OP_0E hint_taken OPE3_02 (ccond-null) (s12-null)) 5996 1.1 christos (sequence () 5997 1.1 christos (c-call VOID "@cpu@_model_branch" (spr-lr) hint_taken) 5998 1.1 christos (set pc (spr-lr))) 5999 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 6000 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 6001 1.1 christos ) 6002 1.1 christos 6003 1.1 christos (dni bnolr 6004 1.1 christos "integer cclr branch never" 6005 1.1 christos ((UNIT B01) (FR500-MAJOR B-3) (FR550-MAJOR B-3) 6006 1.1 christos (FR400-MAJOR B-3) (FR450-MAJOR B-3)) 6007 1.1 christos "bnolr$pack$hint_not_taken" 6008 1.1 christos (+ pack ICC_nev (ICCi_2-null) OP_0E hint_not_taken OPE3_02 (ccond-null) (s12-null)) 6009 1.1 christos (c-call VOID "@cpu@_model_branch" (spr-lr) hint_not_taken) 6010 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 6011 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 6012 1.1 christos ) 6013 1.1 christos 6014 1.1 christos (conditional-branch-cclr b eq I OP_0E OPE3_02 Ieq NA "integer cclr branch equal") 6015 1.1 christos (conditional-branch-cclr b ne I OP_0E OPE3_02 Ine NA "integer cclr branch not equal") 6016 1.1 christos (conditional-branch-cclr b le I OP_0E OPE3_02 Ile NA "integer cclr branch less or equal") 6017 1.1 christos (conditional-branch-cclr b gt I OP_0E OPE3_02 Igt NA "integer cclr branch greater") 6018 1.1 christos (conditional-branch-cclr b lt I OP_0E OPE3_02 Ilt NA "integer cclr branch less") 6019 1.1 christos (conditional-branch-cclr b ge I OP_0E OPE3_02 Ige NA "integer cclr branch greater or equal") 6020 1.1 christos (conditional-branch-cclr b ls I OP_0E OPE3_02 Ils NA "integer cclr branch less or equal unsigned") 6021 1.1 christos (conditional-branch-cclr b hi I OP_0E OPE3_02 Ihi NA "integer cclr branch greater unsigned") 6022 1.1 christos (conditional-branch-cclr b c I OP_0E OPE3_02 Ic NA "integer cclr branch carry set") 6023 1.1 christos (conditional-branch-cclr b nc I OP_0E OPE3_02 Inc NA "integer cclr branch carry clear") 6024 1.1 christos (conditional-branch-cclr b n I OP_0E OPE3_02 In NA "integer cclr branch negative") 6025 1.1 christos (conditional-branch-cclr b p I OP_0E OPE3_02 Ip NA "integer cclr branch positive") 6026 1.1 christos (conditional-branch-cclr b v I OP_0E OPE3_02 Iv NA "integer cclr branch overflow set") 6027 1.1 christos (conditional-branch-cclr b nv I OP_0E OPE3_02 Inv NA "integer cclr branch overflow clear") 6028 1.1 christos 6029 1.1 christos (dni fbralr 6030 1.1 christos "float cclr branch always" 6031 1.1 christos ((UNIT B01) (FR500-MAJOR B-3) (FR550-MAJOR B-3) 6032 1.1 christos (FR400-MAJOR B-3) (FR450-MAJOR B-3) FR-ACCESS) 6033 1.1 christos "fbralr$pack$hint_taken" 6034 1.1 christos (+ pack FCC_ra (FCCi_2-null) OP_0E hint_taken OPE3_06 (ccond-null) (s12-null)) 6035 1.1 christos (sequence () 6036 1.1 christos (c-call VOID "@cpu@_model_branch" (spr-lr) hint_taken) 6037 1.1 christos (set pc (spr-lr))) 6038 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 6039 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 6040 1.1 christos ) 6041 1.1 christos 6042 1.1 christos (dni fbnolr 6043 1.1 christos "float cclr branch never" 6044 1.1 christos ((UNIT B01) (FR500-MAJOR B-3) (FR550-MAJOR B-3) 6045 1.1 christos (FR400-MAJOR B-3) (FR450-MAJOR B-3) FR-ACCESS) 6046 1.1 christos "fbnolr$pack$hint_not_taken" 6047 1.1 christos (+ pack FCC_nev (FCCi_2-null) OP_0E hint_not_taken OPE3_06 (ccond-null) (s12-null)) 6048 1.1 christos (c-call VOID "@cpu@_model_branch" (spr-lr) hint_not_taken) 6049 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 6050 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 6051 1.1 christos ) 6052 1.1 christos 6053 1.1 christos (conditional-branch-cclr fb eq F OP_0E OPE3_06 Feq FR-ACCESS "float cclr branch equal") 6054 1.1 christos (conditional-branch-cclr fb ne F OP_0E OPE3_06 Fne FR-ACCESS "float cclr branch not equal") 6055 1.1 christos (conditional-branch-cclr fb lg F OP_0E OPE3_06 Flg FR-ACCESS "float branch less or greater") 6056 1.1 christos (conditional-branch-cclr fb ue F OP_0E OPE3_06 Fue FR-ACCESS "float branch unordered or equal") 6057 1.1 christos (conditional-branch-cclr fb ul F OP_0E OPE3_06 Ful FR-ACCESS "float branch unordered or less") 6058 1.1 christos (conditional-branch-cclr fb ge F OP_0E OPE3_06 Fge FR-ACCESS "float branch greater or equal") 6059 1.1 christos (conditional-branch-cclr fb lt F OP_0E OPE3_06 Flt FR-ACCESS "float branch less") 6060 1.1 christos (conditional-branch-cclr fb uge F OP_0E OPE3_06 Fuge FR-ACCESS "float branch unordered, greater, equal") 6061 1.1 christos (conditional-branch-cclr fb ug F OP_0E OPE3_06 Fug FR-ACCESS "float branch unordered or greater") 6062 1.1 christos (conditional-branch-cclr fb le F OP_0E OPE3_06 Fle FR-ACCESS "float branch less or equal") 6063 1.1 christos (conditional-branch-cclr fb gt F OP_0E OPE3_06 Fgt FR-ACCESS "float branch greater") 6064 1.1 christos (conditional-branch-cclr fb ule F OP_0E OPE3_06 Fule FR-ACCESS "float branch unordered, less or equal") 6065 1.1 christos (conditional-branch-cclr fb u F OP_0E OPE3_06 Fu FR-ACCESS "float branch unordered") 6066 1.1 christos (conditional-branch-cclr fb o F OP_0E OPE3_06 Fo FR-ACCESS "float branch ordered") 6067 1.1 christos 6068 1.1 christos (define-pmacro (conditional-branch-ctrlr prefix cc i-f op ope cond attr comment) 6069 1.1 christos (dni (.sym prefix cc lr) 6070 1.1 christos (comment) 6071 1.1 christos ((UNIT B0) (FR500-MAJOR B-2) (FR550-MAJOR B-2) 6072 1.1 christos (FR400-MAJOR B-2) (FR450-MAJOR B-2) attr) 6073 1.1 christos (.str (.sym prefix cc lr) "$pack $" i-f "CCi_2,$ccond,$hint") 6074 1.1 christos (+ pack (.sym i-f CC_ cc) (.sym i-f CCi_2) op hint ope ccond (s12-null)) 6075 1.1 christos (sequence () 6076 1.1 christos (c-call VOID "@cpu@_model_branch" (spr-lr) hint) 6077 1.1 christos (ctrlr-branch-semantics (cond (.sym i-f CCi_2)) ccond)) 6078 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 6079 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 6080 1.1 christos ) 6081 1.1 christos ) 6082 1.1 christos 6083 1.1 christos (dni bcralr 6084 1.1 christos "integer ctrlr branch always" 6085 1.1 christos ((UNIT B0) (FR500-MAJOR B-2) (FR550-MAJOR B-2) 6086 1.1 christos (FR400-MAJOR B-2) (FR450-MAJOR B-2)) 6087 1.1 christos "bcralr$pack $ccond$hint_taken" 6088 1.1 christos (+ pack ICC_ra (ICCi_2-null) OP_0E hint_taken OPE3_03 ccond (s12-null)) 6089 1.1 christos (sequence () 6090 1.1 christos (c-call VOID "@cpu@_model_branch" (spr-lr) hint_taken) 6091 1.1 christos (ctrlr-branch-semantics (const BI 1) ccond)) 6092 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 6093 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 6094 1.1 christos ) 6095 1.1 christos 6096 1.1 christos (dni bcnolr 6097 1.1 christos "integer ctrlr branch never" 6098 1.1 christos ((UNIT B0) (FR500-MAJOR B-2) (FR550-MAJOR B-2) 6099 1.1 christos (FR400-MAJOR B-2) (FR450-MAJOR B-2)) 6100 1.1 christos "bcnolr$pack$hint_not_taken" 6101 1.1 christos (+ pack ICC_nev (ICCi_2-null) OP_0E hint_not_taken OPE3_03 (ccond-null) (s12-null)) 6102 1.1 christos (sequence () 6103 1.1 christos (c-call VOID "@cpu@_model_branch" (spr-lr) hint_not_taken) 6104 1.1 christos (ctrlr-branch-semantics (const BI 0) ccond)) 6105 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 6106 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 6107 1.1 christos ) 6108 1.1 christos 6109 1.1 christos (conditional-branch-ctrlr bc eq I OP_0E OPE3_03 Ieq NA "integer ctrlr branch equal") 6110 1.1 christos (conditional-branch-ctrlr bc ne I OP_0E OPE3_03 Ine NA "integer ctrlr branch not equal") 6111 1.1 christos (conditional-branch-ctrlr bc le I OP_0E OPE3_03 Ile NA "integer ctrlr branch less equal") 6112 1.1 christos (conditional-branch-ctrlr bc gt I OP_0E OPE3_03 Igt NA "integer ctrlr branch greater") 6113 1.1 christos (conditional-branch-ctrlr bc lt I OP_0E OPE3_03 Ilt NA "integer ctrlr branch less") 6114 1.1 christos (conditional-branch-ctrlr bc ge I OP_0E OPE3_03 Ige NA "integer ctrlr branch greater equal") 6115 1.1 christos (conditional-branch-ctrlr bc ls I OP_0E OPE3_03 Ils NA "integer ctrlr branch less equal unsigned") 6116 1.1 christos (conditional-branch-ctrlr bc hi I OP_0E OPE3_03 Ihi NA "integer ctrlr branch greater unsigned") 6117 1.1 christos (conditional-branch-ctrlr bc c I OP_0E OPE3_03 Ic NA "integer ctrlr branch carry set") 6118 1.1 christos (conditional-branch-ctrlr bc nc I OP_0E OPE3_03 Inc NA "integer ctrlr branch carry clear") 6119 1.1 christos (conditional-branch-ctrlr bc n I OP_0E OPE3_03 In NA "integer ctrlr branch negative") 6120 1.1 christos (conditional-branch-ctrlr bc p I OP_0E OPE3_03 Ip NA "integer ctrlr branch positive") 6121 1.1 christos (conditional-branch-ctrlr bc v I OP_0E OPE3_03 Iv NA "integer ctrlr branch overflow set") 6122 1.1 christos (conditional-branch-ctrlr bc nv I OP_0E OPE3_03 Inv NA "integer ctrlr branch overflow clear") 6123 1.1 christos 6124 1.1 christos (dni fcbralr 6125 1.1 christos "float ctrlr branch always" 6126 1.1 christos ((UNIT B0) (FR500-MAJOR B-2) (FR550-MAJOR B-2) 6127 1.1 christos (FR400-MAJOR B-2) (FR450-MAJOR B-2) FR-ACCESS) 6128 1.1 christos "fcbralr$pack $ccond$hint_taken" 6129 1.1 christos (+ pack FCC_ra (FCCi_2-null) OP_0E hint_taken OPE3_07 ccond (s12-null)) 6130 1.1 christos (sequence () 6131 1.1 christos (c-call VOID "@cpu@_model_branch" (spr-lr) hint_taken) 6132 1.1 christos (ctrlr-branch-semantics (const BI 1) ccond)) 6133 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 6134 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 6135 1.1 christos ) 6136 1.1 christos 6137 1.1 christos (dni fcbnolr 6138 1.1 christos "float ctrlr branch never" 6139 1.1 christos ((UNIT B0) (FR500-MAJOR B-2) (FR550-MAJOR B-2) 6140 1.1 christos (FR400-MAJOR B-2) (FR450-MAJOR B-2) FR-ACCESS) 6141 1.1 christos "fcbnolr$pack$hint_not_taken" 6142 1.1 christos (+ pack FCC_nev (FCCi_2-null) OP_0E hint_not_taken OPE3_07 (ccond-null) (s12-null)) 6143 1.1 christos (sequence () 6144 1.1 christos (c-call VOID "@cpu@_model_branch" (spr-lr) hint_not_taken) 6145 1.1 christos (ctrlr-branch-semantics (const BI 0) ccond)) 6146 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 6147 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 6148 1.1 christos ) 6149 1.1 christos 6150 1.1 christos (conditional-branch-ctrlr fcb eq F OP_0E OPE3_07 Feq FR-ACCESS "float cclr branch equal") 6151 1.1 christos (conditional-branch-ctrlr fcb ne F OP_0E OPE3_07 Fne FR-ACCESS "float cclr branch not equal") 6152 1.1 christos (conditional-branch-ctrlr fcb lg F OP_0E OPE3_07 Flg FR-ACCESS "float branch less or greater") 6153 1.1 christos (conditional-branch-ctrlr fcb ue F OP_0E OPE3_07 Fue FR-ACCESS "float branch unordered or equal") 6154 1.1 christos (conditional-branch-ctrlr fcb ul F OP_0E OPE3_07 Ful FR-ACCESS "float branch unordered or less") 6155 1.1 christos (conditional-branch-ctrlr fcb ge F OP_0E OPE3_07 Fge FR-ACCESS "float branch greater or equal") 6156 1.1 christos (conditional-branch-ctrlr fcb lt F OP_0E OPE3_07 Flt FR-ACCESS "float branch less") 6157 1.1 christos (conditional-branch-ctrlr fcb uge F OP_0E OPE3_07 Fuge FR-ACCESS "float branch unordered, greater, equal") 6158 1.1 christos (conditional-branch-ctrlr fcb ug F OP_0E OPE3_07 Fug FR-ACCESS "float branch unordered or greater") 6159 1.1 christos (conditional-branch-ctrlr fcb le F OP_0E OPE3_07 Fle FR-ACCESS "float branch less or equal") 6160 1.1 christos (conditional-branch-ctrlr fcb gt F OP_0E OPE3_07 Fgt FR-ACCESS "float branch greater") 6161 1.1 christos (conditional-branch-ctrlr fcb ule F OP_0E OPE3_07 Fule FR-ACCESS "float branch unordered, less or equal") 6162 1.1 christos (conditional-branch-ctrlr fcb u F OP_0E OPE3_07 Fu FR-ACCESS "float branch unordered") 6163 1.1 christos (conditional-branch-ctrlr fcb o F OP_0E OPE3_07 Fo FR-ACCESS "float branch ordered") 6164 1.1 christos 6165 1.1 christos (define-pmacro (jump-and-link-semantics base offset LI) 6166 1.1 christos (sequence () 6167 1.1 christos (if (eq LI 1) 6168 1.1 christos (c-call VOID "@cpu@_set_write_next_vliw_addr_to_LR" 1)) 6169 1.1 christos ; Target address gets aligned here 6170 1.1 christos (set pc (and (add base offset) #xfffffffc)) 6171 1.1 christos (c-call VOID "@cpu@_model_branch" pc #x2)) ; hint branch taken 6172 1.1 christos ) 6173 1.1 christos 6174 1.1 christos (dni jmpl 6175 1.1 christos "jump and link" 6176 1.1 christos ((UNIT I0) (FR500-MAJOR I-5) (FR550-MAJOR I-6) 6177 1.1 christos (FR400-MAJOR I-5) (FR450-MAJOR I-5)) 6178 1.1 christos "jmpl$pack @($GRi,$GRj)" 6179 1.1 christos (+ pack (misc-null-1) (LI-off) OP_0C GRi (misc-null-2) GRj) 6180 1.1 christos (jump-and-link-semantics GRi GRj LI) 6181 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 6182 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 6183 1.1 christos ) 6184 1.1 christos 6185 1.1 christos (dann callann "call annotation" SI "call_annotation" "at") 6186 1.1 christos 6187 1.1 christos (dni calll 6188 1.1 christos "call and link" 6189 1.1 christos ((UNIT I0) (FR500-MAJOR I-5) (FR550-MAJOR I-6) 6190 1.1 christos (FR400-MAJOR I-5) (FR450-MAJOR I-5)) 6191 1.1 christos "calll$pack $callann($GRi,$GRj)" 6192 1.1 christos (+ pack (misc-null-1) (LI-on) OP_0C GRi (misc-null-2) GRj) 6193 1.1 christos (jump-and-link-semantics GRi GRj LI) 6194 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 6195 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 6196 1.1 christos ) 6197 1.1 christos 6198 1.1 christos (dni jmpil 6199 1.1 christos "jump immediate and link" 6200 1.1 christos ((UNIT I0) (FR500-MAJOR I-5) (FR550-MAJOR I-6) 6201 1.1 christos (FR400-MAJOR I-5) (FR450-MAJOR I-5)) 6202 1.1 christos "jmpil$pack @($GRi,$s12)" 6203 1.1 christos (+ pack (misc-null-1) (LI-off) OP_0D GRi s12) 6204 1.1 christos (jump-and-link-semantics GRi s12 LI) 6205 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 6206 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 6207 1.1 christos ) 6208 1.1 christos 6209 1.1 christos (dni callil 6210 1.1 christos "call immediate and link" 6211 1.1 christos ((UNIT I0) (FR500-MAJOR I-5) (FR550-MAJOR I-6) 6212 1.1 christos (FR400-MAJOR I-5) (FR450-MAJOR I-5)) 6213 1.1 christos "callil$pack @($GRi,$s12)" 6214 1.1 christos (+ pack (misc-null-1) (LI-on) OP_0D GRi s12) 6215 1.1 christos (jump-and-link-semantics GRi s12 LI) 6216 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 6217 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 6218 1.1 christos ) 6219 1.1 christos 6220 1.1 christos (dni call 6221 1.1 christos "call and link" 6222 1.1 christos ((UNIT B0) (FR500-MAJOR B-4) (FR550-MAJOR B-4) 6223 1.1 christos (FR400-MAJOR B-4) (FR450-MAJOR B-4)) 6224 1.1 christos "call$pack $label24" 6225 1.1 christos (+ pack OP_0F label24) 6226 1.1 christos (sequence () 6227 1.1 christos (c-call VOID "@cpu@_set_write_next_vliw_addr_to_LR" 1) 6228 1.1 christos (set pc label24) 6229 1.1 christos (c-call VOID "@cpu@_model_branch" pc #x2)) ; hint branch taken 6230 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 6231 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 6232 1.1 christos ) 6233 1.1 christos 6234 1.1 christos (dni rett 6235 1.1 christos "return from trap" 6236 1.1 christos ((UNIT C) (FR500-MAJOR C-2) (FR550-MAJOR C-2) 6237 1.1 christos (FR400-MAJOR C-2) (FR450-MAJOR C-2) PRIVILEGED) 6238 1.1 christos "rett$pack $debug" 6239 1.1 christos (+ pack (misc-null-1) debug OP_05 (rs-null) (s12-null)) 6240 1.1 christos ; frv_rett handles operating vs user mode 6241 1.1 christos (sequence () 6242 1.1 christos (set pc (c-call UWI "frv_rett" pc debug)) 6243 1.1 christos (c-call VOID "@cpu@_model_branch" pc #x2)) ; hint branch taken 6244 1.1 christos () 6245 1.1 christos ) 6246 1.1 christos 6247 1.1 christos (dni rei 6248 1.1 christos "run exception instruction" 6249 1.1 christos ((UNIT C) (FR500-MAJOR C-1) (MACH frv) PRIVILEGED) 6250 1.1 christos "rei$pack $eir" 6251 1.1 christos (+ pack (rd-null) OP_37 eir (s12-null)) 6252 1.1 christos (nop) ; for now 6253 1.1 christos () 6254 1.1 christos ) 6255 1.1 christos 6256 1.1 christos (define-pmacro (trap-semantics cond base offset) 6257 1.1 christos (if cond 6258 1.1 christos (sequence () 6259 1.1 christos ; This is defered to frv_itrap because for the breakpoint 6260 1.1 christos ; case we want to change as little of the machine state as 6261 1.1 christos ; possible. 6262 1.1 christos ; 6263 1.1 christos ; PCSR=PC 6264 1.1 christos ; PSR.PS=PSR.S 6265 1.1 christos ; PSR.ET=0 6266 1.1 christos ; if PSR.ESR==1 6267 1.1 christos ; SR0 through SR3=GR4 through GR7 6268 1.1 christos ; TBR.TT=0x80 + ((GRi + s12) & 0x7f) 6269 1.1 christos ; PC=TBR 6270 1.1 christos ; We still should indicate what is modified by this insn. 6271 1.1 christos (clobber (spr-pcsr)) 6272 1.1 christos (clobber psr_ps) 6273 1.1 christos (clobber psr_et) 6274 1.1 christos (clobber tbr_tt) 6275 1.1 christos (if (ne psr_esr (const 0)) 6276 1.1 christos (sequence () 6277 1.1 christos (clobber (spr-sr0)) 6278 1.1 christos (clobber (spr-sr1)) 6279 1.1 christos (clobber (spr-sr2)) 6280 1.1 christos (clobber (spr-sr3)))) 6281 1.1 christos ; frv_itrap handles operating vs user mode 6282 1.1 christos (c-call VOID "frv_itrap" pc base offset))) 6283 1.1 christos ) 6284 1.1 christos 6285 1.1 christos (define-pmacro (trap-r prefix cc i-f op ope cond attr comment) 6286 1.1 christos (dni (.sym prefix cc) 6287 1.1 christos (comment) 6288 1.1 christos ((UNIT C) (FR500-MAJOR C-1) (FR550-MAJOR C-1) 6289 1.1 christos (FR400-MAJOR C-1) (FR450-MAJOR C-1) attr) 6290 1.1 christos (.str (.sym prefix cc) "$pack $" i-f "CCi_2,$GRi,$GRj") 6291 1.1 christos (+ pack (.sym i-f CC_ cc) (.sym i-f CCi_2) op GRi (misc-null-3) ope GRj) 6292 1.1 christos (trap-semantics (cond (.sym i-f CCi_2)) GRi GRj) 6293 1.1 christos ((fr400 (unit u-trap)) (fr450 (unit u-trap)) 6294 1.1 christos (fr500 (unit u-trap)) (fr550 (unit u-trap))) 6295 1.1 christos ) 6296 1.1 christos ) 6297 1.1 christos 6298 1.1 christos (dni tra 6299 1.1 christos "integer trap always" 6300 1.1 christos ((UNIT C) (FR500-MAJOR C-1) (FR550-MAJOR C-1) 6301 1.1 christos (FR400-MAJOR C-1) (FR450-MAJOR C-1)) 6302 1.1 christos "tra$pack $GRi,$GRj" 6303 1.1 christos (+ pack ICC_ra (ICCi_2-null) OP_04 GRi (misc-null-3) OPE4_0 GRj) 6304 1.1 christos (trap-semantics (const BI 1) GRi GRj) 6305 1.1 christos ((fr400 (unit u-trap)) (fr450 (unit u-trap)) 6306 1.1 christos (fr500 (unit u-trap)) (fr550 (unit u-trap))) 6307 1.1 christos ) 6308 1.1 christos 6309 1.1 christos (dni tno 6310 1.1 christos "integer trap never" 6311 1.1 christos ((UNIT C) (FR500-MAJOR C-1) (FR550-MAJOR C-1) 6312 1.1 christos (FR400-MAJOR C-1) (FR450-MAJOR C-1)) 6313 1.1 christos "tno$pack" 6314 1.1 christos (+ pack ICC_nev (ICCi_2-null) OP_04 (GRi-null) (misc-null-3) OPE4_0 (GRj-null)) 6315 1.1 christos (trap-semantics (const BI 0) GRi GRj) 6316 1.1 christos ((fr400 (unit u-trap)) (fr450 (unit u-trap)) 6317 1.1 christos (fr500 (unit u-trap)) (fr550 (unit u-trap))) 6318 1.1 christos ) 6319 1.1 christos 6320 1.1 christos (trap-r t eq I OP_04 OPE4_0 Ieq NA "integer trap equal") 6321 1.1 christos (trap-r t ne I OP_04 OPE4_0 Ine NA "integer trap not equal") 6322 1.1 christos (trap-r t le I OP_04 OPE4_0 Ile NA "integer trap less or equal") 6323 1.1 christos (trap-r t gt I OP_04 OPE4_0 Igt NA "integer trap greater") 6324 1.1 christos (trap-r t lt I OP_04 OPE4_0 Ilt NA "integer trap less") 6325 1.1 christos (trap-r t ge I OP_04 OPE4_0 Ige NA "integer trap greater or equal") 6326 1.1 christos (trap-r t ls I OP_04 OPE4_0 Ils NA "integer trap less or equal unsigned") 6327 1.1 christos (trap-r t hi I OP_04 OPE4_0 Ihi NA "integer trap greater unsigned") 6328 1.1 christos (trap-r t c I OP_04 OPE4_0 Ic NA "integer trap carry set") 6329 1.1 christos (trap-r t nc I OP_04 OPE4_0 Inc NA "integer trap carry clear") 6330 1.1 christos (trap-r t n I OP_04 OPE4_0 In NA "integer trap negative") 6331 1.1 christos (trap-r t p I OP_04 OPE4_0 Ip NA "integer trap positive") 6332 1.1 christos (trap-r t v I OP_04 OPE4_0 Iv NA "integer trap overflow set") 6333 1.1 christos (trap-r t nv I OP_04 OPE4_0 Inv NA "integer trap overflow clear") 6334 1.1 christos 6335 1.1 christos (dni ftra 6336 1.1 christos "float trap always" 6337 1.1 christos ((UNIT C) (FR500-MAJOR C-1) (FR550-MAJOR C-1) 6338 1.1 christos (FR400-MAJOR C-1) (FR450-MAJOR C-1) FR-ACCESS) 6339 1.1 christos "ftra$pack $GRi,$GRj" 6340 1.1 christos (+ pack FCC_ra (FCCi_2-null) OP_04 GRi (misc-null-3) OPE4_1 GRj) 6341 1.1 christos (trap-semantics (const BI 1) GRi GRj) 6342 1.1 christos ((fr400 (unit u-trap)) (fr450 (unit u-trap)) 6343 1.1 christos (fr500 (unit u-trap)) (fr550 (unit u-trap))) 6344 1.1 christos ) 6345 1.1 christos 6346 1.1 christos (dni ftno 6347 1.1 christos "flost trap never" 6348 1.1 christos ((UNIT C) (FR500-MAJOR C-1) (FR550-MAJOR C-1) 6349 1.1 christos (FR400-MAJOR C-1) (FR450-MAJOR C-1) FR-ACCESS) 6350 1.1 christos "ftno$pack" 6351 1.1 christos (+ pack FCC_nev (FCCi_2-null) OP_04 (GRi-null) (misc-null-3) OPE4_1 (GRj-null)) 6352 1.1 christos (trap-semantics (const BI 0) GRi GRj) 6353 1.1 christos ((fr400 (unit u-trap)) (fr450 (unit u-trap)) 6354 1.1 christos (fr500 (unit u-trap)) (fr550 (unit u-trap))) 6355 1.1 christos ) 6356 1.1 christos 6357 1.1 christos (trap-r ft ne F OP_04 OPE4_1 Fne FR-ACCESS "float trap not equal") 6358 1.1 christos (trap-r ft eq F OP_04 OPE4_1 Feq FR-ACCESS "float trap equal") 6359 1.1 christos (trap-r ft lg F OP_04 OPE4_1 Flg FR-ACCESS "float trap greater or less") 6360 1.1 christos (trap-r ft ue F OP_04 OPE4_1 Fue FR-ACCESS "float trap unordered or equal") 6361 1.1 christos (trap-r ft ul F OP_04 OPE4_1 Ful FR-ACCESS "float trap unordered or less") 6362 1.1 christos (trap-r ft ge F OP_04 OPE4_1 Fge FR-ACCESS "float trap greater or equal") 6363 1.1 christos (trap-r ft lt F OP_04 OPE4_1 Flt FR-ACCESS "float trap less") 6364 1.1 christos (trap-r ft uge F OP_04 OPE4_1 Fuge FR-ACCESS "float trap unordered greater or equal") 6365 1.1 christos (trap-r ft ug F OP_04 OPE4_1 Fug FR-ACCESS "float trap unordered or greater") 6366 1.1 christos (trap-r ft le F OP_04 OPE4_1 Fle FR-ACCESS "float trap less or equal") 6367 1.1 christos (trap-r ft gt F OP_04 OPE4_1 Fgt FR-ACCESS "float trap greater") 6368 1.1 christos (trap-r ft ule F OP_04 OPE4_1 Fule FR-ACCESS "float trap unordered less or equal") 6369 1.1 christos (trap-r ft u F OP_04 OPE4_1 Fu FR-ACCESS "float trap unordered") 6370 1.1 christos (trap-r ft o F OP_04 OPE4_1 Fo FR-ACCESS "float trap ordered") 6371 1.1 christos 6372 1.1 christos (define-pmacro (trap-immed prefix cc i-f op cond attr comment) 6373 1.1 christos (dni (.sym prefix cc) 6374 1.1 christos (comment) 6375 1.1 christos ((UNIT C) (FR500-MAJOR C-1) (FR550-MAJOR C-1) 6376 1.1 christos (FR400-MAJOR C-1) (FR450-MAJOR C-1) attr) 6377 1.1 christos (.str (.sym prefix cc) "$pack $" i-f "CCi_2,$GRi,$s12") 6378 1.1 christos (+ pack (.sym i-f CC_ cc) (.sym i-f CCi_2) op GRi s12) 6379 1.1 christos (trap-semantics (cond (.sym i-f CCi_2)) GRi s12) 6380 1.1 christos ((fr400 (unit u-trap)) (fr450 (unit u-trap)) 6381 1.1 christos (fr500 (unit u-trap)) (fr550 (unit u-trap))) 6382 1.1 christos ) 6383 1.1 christos ) 6384 1.1 christos 6385 1.1 christos (dni tira 6386 1.1 christos "integer trap always" 6387 1.1 christos ((UNIT C) (FR500-MAJOR C-1) (FR550-MAJOR C-1) 6388 1.1 christos (FR400-MAJOR C-1) (FR450-MAJOR C-1)) 6389 1.1 christos "tira$pack $GRi,$s12" 6390 1.1 christos (+ pack ICC_ra (ICCi_2-null) OP_1C GRi s12) 6391 1.1 christos (trap-semantics (const BI 1) GRi s12) 6392 1.1 christos ((fr400 (unit u-trap)) (fr450 (unit u-trap)) 6393 1.1 christos (fr500 (unit u-trap)) (fr550 (unit u-trap))) 6394 1.1 christos ) 6395 1.1 christos 6396 1.1 christos (dni tino 6397 1.1 christos "integer trap never" 6398 1.1 christos ((UNIT C) (FR500-MAJOR C-1) (FR550-MAJOR C-1) 6399 1.1 christos (FR400-MAJOR C-1) (FR450-MAJOR C-1)) 6400 1.1 christos "tino$pack" 6401 1.1 christos (+ pack ICC_nev (ICCi_2-null) OP_1C (GRi-null) (s12-null)) 6402 1.1 christos (trap-semantics (const BI 0) GRi s12) 6403 1.1 christos ((fr400 (unit u-trap)) (fr450 (unit u-trap)) 6404 1.1 christos (fr500 (unit u-trap)) (fr550 (unit u-trap))) 6405 1.1 christos ) 6406 1.1 christos 6407 1.1 christos (trap-immed ti eq I OP_1C Ieq NA "integer trap equal") 6408 1.1 christos (trap-immed ti ne I OP_1C Ine NA "integer trap not equal") 6409 1.1 christos (trap-immed ti le I OP_1C Ile NA "integer trap less or equal") 6410 1.1 christos (trap-immed ti gt I OP_1C Igt NA "integer trap greater") 6411 1.1 christos (trap-immed ti lt I OP_1C Ilt NA "integer trap less") 6412 1.1 christos (trap-immed ti ge I OP_1C Ige NA "integer trap greater or equal") 6413 1.1 christos (trap-immed ti ls I OP_1C Ils NA "integer trap less or equal unsigned") 6414 1.1 christos (trap-immed ti hi I OP_1C Ihi NA "integer trap greater unsigned") 6415 1.1 christos (trap-immed ti c I OP_1C Ic NA "integer trap carry set") 6416 1.1 christos (trap-immed ti nc I OP_1C Inc NA "integer trap carry clear") 6417 1.1 christos (trap-immed ti n I OP_1C In NA "integer trap negative") 6418 1.1 christos (trap-immed ti p I OP_1C Ip NA "integer trap positive") 6419 1.1 christos (trap-immed ti v I OP_1C Iv NA "integer trap overflow set") 6420 1.1 christos (trap-immed ti nv I OP_1C Inv NA "integer trap overflow clear") 6421 1.1 christos 6422 1.1 christos (dni ftira 6423 1.1 christos "float trap always" 6424 1.1 christos ((UNIT C) (FR500-MAJOR C-1) (FR550-MAJOR C-1) 6425 1.1 christos (FR400-MAJOR C-1) (FR450-MAJOR C-1) FR-ACCESS) 6426 1.1 christos "ftira$pack $GRi,$s12" 6427 1.1 christos (+ pack FCC_ra (ICCi_2-null) OP_1D GRi s12) 6428 1.1 christos (trap-semantics (const BI 1) GRi s12) 6429 1.1 christos ((fr400 (unit u-trap)) 6430 1.1 christos (fr500 (unit u-trap)) (fr550 (unit u-trap))) 6431 1.1 christos ) 6432 1.1 christos 6433 1.1 christos (dni ftino 6434 1.1 christos "float trap never" 6435 1.1 christos ((UNIT C) (FR500-MAJOR C-1) (FR550-MAJOR C-1) 6436 1.1 christos (FR400-MAJOR C-1) (FR450-MAJOR C-1) FR-ACCESS) 6437 1.1 christos "ftino$pack" 6438 1.1 christos (+ pack FCC_nev (FCCi_2-null) OP_1D (GRi-null) (s12-null)) 6439 1.1 christos (trap-semantics (const BI 0) GRi s12) 6440 1.1 christos ((fr400 (unit u-trap)) (fr450 (unit u-trap)) 6441 1.1 christos (fr500 (unit u-trap)) (fr550 (unit u-trap))) 6442 1.1 christos ) 6443 1.1 christos 6444 1.1 christos (trap-immed fti ne F OP_1D Fne FR-ACCESS "float trap not equal") 6445 1.1 christos (trap-immed fti eq F OP_1D Feq FR-ACCESS "float trap equal") 6446 1.1 christos (trap-immed fti lg F OP_1D Flg FR-ACCESS "float trap greater or less") 6447 1.1 christos (trap-immed fti ue F OP_1D Fue FR-ACCESS "float trap unordered or equal") 6448 1.1 christos (trap-immed fti ul F OP_1D Ful FR-ACCESS "float trap unordered or less") 6449 1.1 christos (trap-immed fti ge F OP_1D Fge FR-ACCESS "float trap greater or equal") 6450 1.1 christos (trap-immed fti lt F OP_1D Flt FR-ACCESS "float trap less") 6451 1.1 christos (trap-immed fti uge F OP_1D Fuge FR-ACCESS "float trap unordered greater or equal") 6452 1.1 christos (trap-immed fti ug F OP_1D Fug FR-ACCESS "float trap unordered or greater") 6453 1.1 christos (trap-immed fti le F OP_1D Fle FR-ACCESS "float trap less or equal") 6454 1.1 christos (trap-immed fti gt F OP_1D Fgt FR-ACCESS "float trap greater") 6455 1.1 christos (trap-immed fti ule F OP_1D Fule FR-ACCESS "float trap unordered less or equal") 6456 1.1 christos (trap-immed fti u F OP_1D Fu FR-ACCESS "float trap unordered") 6457 1.1 christos (trap-immed fti o F OP_1D Fo FR-ACCESS "float trap ordered") 6458 1.1 christos 6459 1.1 christos (dni break 6460 1.1 christos "break trap" 6461 1.1 christos ((UNIT C) (FR500-MAJOR C-1) (FR550-MAJOR C-1) 6462 1.1 christos (FR400-MAJOR C-1) (FR450-MAJOR C-1)) 6463 1.1 christos "break$pack" 6464 1.1 christos (+ pack (rd-null) OP_04 (rs-null) (misc-null-3) OPE4_3 (GRj-null)) 6465 1.1 christos (sequence () 6466 1.1 christos ; This is defered to frv_break because for the breakpoint 6467 1.1 christos ; case we want to change as little of the machine state as 6468 1.1 christos ; possible. 6469 1.1 christos ; 6470 1.1 christos ; BPCSR=PC 6471 1.1 christos ; BPSR.BS=PSR.S 6472 1.1 christos ; BPSR.BET=PSR.ET 6473 1.1 christos ; PSR.S=1 6474 1.1 christos ; PSR.ET=0 6475 1.1 christos ; TBR.TT=0xff 6476 1.1 christos ; PC=TBR 6477 1.1 christos ; We still should indicate what is modified by this insn. 6478 1.1 christos (clobber (spr-bpcsr)) 6479 1.1 christos (clobber bpsr_bs) 6480 1.1 christos (clobber bpsr_bet) 6481 1.1 christos (clobber psr_s) 6482 1.1 christos (clobber psr_et) 6483 1.1 christos (clobber tbr_tt) 6484 1.1 christos (c-call VOID "frv_break")) 6485 1.1 christos () 6486 1.1 christos ) 6487 1.1 christos 6488 1.1 christos (dni mtrap 6489 1.1 christos "media trap" 6490 1.1 christos ((UNIT C) (FR500-MAJOR C-1) (FR550-MAJOR C-1) 6491 1.1 christos (FR400-MAJOR C-1) (FR450-MAJOR C-1) FR-ACCESS) 6492 1.1 christos "mtrap$pack" 6493 1.1 christos (+ pack (rd-null) OP_04 (rs-null) (misc-null-3) OPE4_2 (GRj-null)) 6494 1.1 christos (c-call VOID "frv_mtrap") 6495 1.1 christos () 6496 1.1 christos ) 6497 1.1 christos 6498 1.1 christos (define-pmacro (condition-code-logic name operation ope comment) 6499 1.1 christos (dni name 6500 1.1 christos (comment) 6501 1.1 christos ((UNIT B01) (FR500-MAJOR B-6) (FR550-MAJOR B-6) 6502 1.1 christos (FR400-MAJOR B-6) (FR450-MAJOR B-6)) 6503 1.1 christos (.str name "$pack $CRi,$CRj,$CRk") 6504 1.1 christos (+ pack (misc-null-6) CRk OP_0A (misc-null-7) CRi ope (misc-null-8) CRj) 6505 1.1 christos (set CRk (c-call UQI "@cpu@_cr_logic" operation CRi CRj)) 6506 1.1 christos () 6507 1.1 christos ) 6508 1.1 christos ) 6509 1.1 christos (define-pmacro (op-andcr) 0) 6510 1.1 christos (define-pmacro (op-orcr) 1) 6511 1.1 christos (define-pmacro (op-xorcr) 2) 6512 1.1 christos (define-pmacro (op-nandcr) 3) 6513 1.1 christos (define-pmacro (op-norcr) 4) 6514 1.1 christos (define-pmacro (op-andncr) 5) 6515 1.1 christos (define-pmacro (op-orncr) 6) 6516 1.1 christos (define-pmacro (op-nandncr) 7) 6517 1.1 christos (define-pmacro (op-norncr) 8) 6518 1.1 christos 6519 1.1 christos (define-pmacro (cr-true) 3) 6520 1.1 christos (define-pmacro (cr-false) 2) 6521 1.1 christos (define-pmacro (cr-undefined) 0) 6522 1.1 christos 6523 1.1 christos (condition-code-logic andcr (op-andcr) OPE1_08 "and condition code regs") 6524 1.1 christos (condition-code-logic orcr (op-orcr) OPE1_09 "or condition code regs") 6525 1.1 christos (condition-code-logic xorcr (op-xorcr) OPE1_0A "xor condition code regs") 6526 1.1 christos (condition-code-logic nandcr (op-nandcr) OPE1_0C "nand condition code regs") 6527 1.1 christos (condition-code-logic norcr (op-norcr) OPE1_0D "nor condition code regs") 6528 1.1 christos (condition-code-logic andncr (op-andncr) OPE1_10 "andn condition code regs") 6529 1.1 christos (condition-code-logic orncr (op-orncr) OPE1_11 "orn condition code regs") 6530 1.1 christos (condition-code-logic nandncr (op-nandncr) OPE1_14 "nandn condition code regs") 6531 1.1 christos (condition-code-logic norncr (op-norncr) OPE1_15 "norn condition code regs") 6532 1.1 christos 6533 1.1 christos (dni notcr 6534 1.1 christos ("not cccr register") 6535 1.1 christos ((UNIT B01) (FR500-MAJOR B-6) (FR550-MAJOR B-6) 6536 1.1 christos (FR400-MAJOR B-6) (FR450-MAJOR B-6)) 6537 1.1 christos (.str notcr "$pack $CRj,$CRk") 6538 1.1 christos (+ pack (misc-null-6) CRk OP_0A (rs-null) OPE1_0B (misc-null-8) CRj) 6539 1.1 christos (set CRk (xor CRj 1)) 6540 1.1 christos () 6541 1.1 christos ) 6542 1.1 christos 6543 1.1 christos (define-pmacro (check-semantics cond cr) 6544 1.1 christos (if cond (set cr (cr-true)) (set cr (cr-false))) 6545 1.1 christos ) 6546 1.1 christos 6547 1.1 christos (define-pmacro (check-int-condition-code prefix cc op cond comment) 6548 1.1 christos (dni (.sym prefix cc) 6549 1.1 christos (comment) 6550 1.1 christos ((UNIT B01) (FR500-MAJOR B-5) (FR550-MAJOR B-5) 6551 1.1 christos (FR400-MAJOR B-5) (FR450-MAJOR B-5)) 6552 1.1 christos (.str (.sym prefix cc) "$pack $ICCi_3,$CRj_int") 6553 1.1 christos (+ pack (.sym ICC_ cc) CRj_int op (misc-null-5) ICCi_3) 6554 1.1 christos (check-semantics (cond ICCi_3) CRj_int) 6555 1.1 christos ((fr400 (unit u-check)) (fr450 (unit u-check)) 6556 1.1 christos (fr500 (unit u-check)) (fr550 (unit u-check))) 6557 1.1 christos ) 6558 1.1 christos ) 6559 1.1 christos 6560 1.1 christos (dni ckra 6561 1.1 christos "check integer cc always" 6562 1.1 christos ((UNIT B01) (FR500-MAJOR B-5) (FR550-MAJOR B-5) 6563 1.1 christos (FR400-MAJOR B-5) (FR450-MAJOR B-5)) 6564 1.1 christos "ckra$pack $CRj_int" 6565 1.1 christos (+ pack ICC_ra CRj_int OP_08 (misc-null-5) (ICCi_3-null)) 6566 1.1 christos (check-semantics (const BI 1) CRj_int) 6567 1.1 christos ((fr400 (unit u-check)) (fr450 (unit u-check)) 6568 1.1 christos (fr500 (unit u-check)) (fr550 (unit u-check))) 6569 1.1 christos ) 6570 1.1 christos 6571 1.1 christos (dni ckno 6572 1.1 christos "check integer cc never" 6573 1.1 christos ((UNIT B01) (FR500-MAJOR B-5) (FR550-MAJOR B-5) 6574 1.1 christos (FR400-MAJOR B-5) (FR450-MAJOR B-5)) 6575 1.1 christos "ckno$pack $CRj_int" 6576 1.1 christos (+ pack ICC_nev CRj_int OP_08 (misc-null-5) (ICCi_3-null)) 6577 1.1 christos (check-semantics (const BI 0) CRj_int) 6578 1.1 christos ((fr400 (unit u-check)) (fr450 (unit u-check)) 6579 1.1 christos (fr500 (unit u-check)) (fr550 (unit u-check))) 6580 1.1 christos ) 6581 1.1 christos 6582 1.1 christos (check-int-condition-code ck eq OP_08 Ieq "check integer cc equal") 6583 1.1 christos (check-int-condition-code ck ne OP_08 Ine "check integer cc not equal") 6584 1.1 christos (check-int-condition-code ck le OP_08 Ile "check integer cc less or equal") 6585 1.1 christos (check-int-condition-code ck gt OP_08 Igt "check integer cc greater") 6586 1.1 christos (check-int-condition-code ck lt OP_08 Ilt "check integer cc less") 6587 1.1 christos (check-int-condition-code ck ge OP_08 Ige "check integer cc greater or equal") 6588 1.1 christos (check-int-condition-code ck ls OP_08 Ils "check integer cc less or equal unsigned") 6589 1.1 christos (check-int-condition-code ck hi OP_08 Ihi "check integer cc greater unsigned") 6590 1.1 christos (check-int-condition-code ck c OP_08 Ic "check integer cc carry set") 6591 1.1 christos (check-int-condition-code ck nc OP_08 Inc "check integer cc carry clear") 6592 1.1 christos (check-int-condition-code ck n OP_08 In "check integer cc negative") 6593 1.1 christos (check-int-condition-code ck p OP_08 Ip "check integer cc positive") 6594 1.1 christos (check-int-condition-code ck v OP_08 Iv "check integer cc overflow set") 6595 1.1 christos (check-int-condition-code ck nv OP_08 Inv "check integer cc overflow clear") 6596 1.1 christos 6597 1.1 christos (define-pmacro (check-float-condition-code prefix cc op cond comment) 6598 1.1 christos (dni (.sym prefix cc) 6599 1.1 christos (comment) 6600 1.1 christos ((UNIT B01) (FR500-MAJOR B-5) (FR550-MAJOR B-5) 6601 1.1 christos (FR400-MAJOR B-5) (FR450-MAJOR B-5) FR-ACCESS) 6602 1.1 christos (.str (.sym prefix cc) "$pack $FCCi_3,$CRj_float") 6603 1.1 christos (+ pack (.sym FCC_ cc) CRj_float op (misc-null-5) FCCi_3) 6604 1.1 christos (check-semantics (cond FCCi_3) CRj_float) 6605 1.1 christos ((fr400 (unit u-check)) (fr450 (unit u-check)) 6606 1.1 christos (fr500 (unit u-check)) (fr550 (unit u-check))) 6607 1.1 christos ) 6608 1.1 christos ) 6609 1.1 christos 6610 1.1 christos (dni fckra 6611 1.1 christos "check float cc always" 6612 1.1 christos ((UNIT B01) (FR500-MAJOR B-5) (FR550-MAJOR B-5) 6613 1.1 christos (FR400-MAJOR B-5) (FR450-MAJOR B-5) FR-ACCESS) 6614 1.1 christos "fckra$pack $CRj_float" 6615 1.1 christos (+ pack FCC_ra CRj_float OP_09 (misc-null-5) FCCi_3) 6616 1.1 christos (check-semantics (const BI 1) CRj_float) 6617 1.1 christos ((fr400 (unit u-check)) (fr450 (unit u-check)) 6618 1.1 christos (fr500 (unit u-check)) (fr550 (unit u-check))) 6619 1.1 christos ) 6620 1.1 christos 6621 1.1 christos (dni fckno 6622 1.1 christos "check float cc never" 6623 1.1 christos ((UNIT B01) (FR500-MAJOR B-5) (FR550-MAJOR B-5) 6624 1.1 christos (FR400-MAJOR B-5) (FR450-MAJOR B-5) FR-ACCESS) 6625 1.1 christos "fckno$pack $CRj_float" 6626 1.1 christos (+ pack FCC_nev CRj_float OP_09 (misc-null-5) FCCi_3) 6627 1.1 christos (check-semantics (const BI 0) CRj_float) 6628 1.1 christos ((fr400 (unit u-check)) (fr450 (unit u-check)) 6629 1.1 christos (fr500 (unit u-check)) (fr550 (unit u-check))) 6630 1.1 christos ) 6631 1.1 christos 6632 1.1 christos (check-float-condition-code fck ne OP_09 Fne "check float cc not equal") 6633 1.1 christos (check-float-condition-code fck eq OP_09 Feq "check float cc equal") 6634 1.1 christos (check-float-condition-code fck lg OP_09 Flg "check float cc greater or less") 6635 1.1 christos (check-float-condition-code fck ue OP_09 Fue "check float cc unordered or equal") 6636 1.1 christos (check-float-condition-code fck ul OP_09 Ful "check float cc unordered or less") 6637 1.1 christos (check-float-condition-code fck ge OP_09 Fge "check float cc greater or equal") 6638 1.1 christos (check-float-condition-code fck lt OP_09 Flt "check float cc less") 6639 1.1 christos (check-float-condition-code fck uge OP_09 Fuge "check float cc unordered greater or equal") 6640 1.1 christos (check-float-condition-code fck ug OP_09 Fug "check float cc unordered or greater") 6641 1.1 christos (check-float-condition-code fck le OP_09 Fle "check float cc less or equal") 6642 1.1 christos (check-float-condition-code fck gt OP_09 Fgt "check float cc greater") 6643 1.1 christos (check-float-condition-code fck ule OP_09 Fule "check float cc unordered less or equal") 6644 1.1 christos (check-float-condition-code fck u OP_09 Fu "check float cc unordered") 6645 1.1 christos (check-float-condition-code fck o OP_09 Fo "check float cc ordered") 6646 1.1 christos 6647 1.1 christos (define-pmacro (conditional-check-int-condition-code prefix cc op ope test comment) 6648 1.1 christos (dni (.sym prefix cc) 6649 1.1 christos (comment) 6650 1.1 christos ((UNIT B01) (FR500-MAJOR B-5) (FR550-MAJOR B-5) 6651 1.1 christos (FR400-MAJOR B-5) (FR450-MAJOR B-5) CONDITIONAL) 6652 1.1 christos (.str (.sym prefix cc) "$pack $ICCi_3,$CRj_int,$CCi,$cond") 6653 1.1 christos (+ pack (.sym ICC_ cc) CRj_int op (rs-null) CCi cond ope 6654 1.1 christos (misc-null-9) ICCi_3) 6655 1.1 christos (if (eq CCi (or cond 2)) 6656 1.1 christos (check-semantics (test ICCi_3) CRj_int) 6657 1.1 christos (set CRj_int (cr-undefined))) 6658 1.1 christos ((fr400 (unit u-check)) (fr450 (unit u-check)) 6659 1.1 christos (fr500 (unit u-check)) (fr550 (unit u-check))) 6660 1.1 christos ) 6661 1.1 christos ) 6662 1.1 christos 6663 1.1 christos (dni cckra 6664 1.1 christos "conditional check integer cc always" 6665 1.1 christos ((UNIT B01) (FR500-MAJOR B-5) (FR550-MAJOR B-5) 6666 1.1 christos (FR400-MAJOR B-5) (FR450-MAJOR B-5) CONDITIONAL) 6667 1.1 christos "cckra$pack $CRj_int,$CCi,$cond" 6668 1.1 christos (+ pack ICC_ra CRj_int OP_6A (rs-null) CCi cond OPE4_0 6669 1.1 christos (misc-null-9) (ICCi_3-null)) 6670 1.1 christos (if (eq CCi (or cond 2)) 6671 1.1 christos (check-semantics (const BI 1) CRj_int) 6672 1.1 christos (set CRj_int (cr-undefined))) 6673 1.1 christos ((fr400 (unit u-check)) (fr450 (unit u-check)) 6674 1.1 christos (fr500 (unit u-check)) (fr550 (unit u-check))) 6675 1.1 christos ) 6676 1.1 christos 6677 1.1 christos (dni cckno 6678 1.1 christos "conditional check integer cc never" 6679 1.1 christos ((UNIT B01) (FR500-MAJOR B-5) (FR550-MAJOR B-5) 6680 1.1 christos (FR400-MAJOR B-5) (FR450-MAJOR B-5) CONDITIONAL) 6681 1.1 christos "cckno$pack $CRj_int,$CCi,$cond" 6682 1.1 christos (+ pack ICC_nev CRj_int OP_6A (rs-null) CCi cond OPE4_0 6683 1.1 christos (misc-null-9) (ICCi_3-null)) 6684 1.1 christos (if (eq CCi (or cond 2)) 6685 1.1 christos (check-semantics (const BI 0) CRj_int) 6686 1.1 christos (set CRj_int (cr-undefined))) 6687 1.1 christos ((fr400 (unit u-check)) (fr450 (unit u-check)) 6688 1.1 christos (fr500 (unit u-check)) (fr550 (unit u-check))) 6689 1.1 christos ) 6690 1.1 christos 6691 1.1 christos (conditional-check-int-condition-code cck eq OP_6A OPE4_0 Ieq "check integer cc equal") 6692 1.1 christos (conditional-check-int-condition-code cck ne OP_6A OPE4_0 Ine "check integer cc not equal") 6693 1.1 christos (conditional-check-int-condition-code cck le OP_6A OPE4_0 Ile "check integer cc less or equal") 6694 1.1 christos (conditional-check-int-condition-code cck gt OP_6A OPE4_0 Igt "check integer cc greater") 6695 1.1 christos (conditional-check-int-condition-code cck lt OP_6A OPE4_0 Ilt "check integer cc less") 6696 1.1 christos (conditional-check-int-condition-code cck ge OP_6A OPE4_0 Ige "check integer cc greater or equal") 6697 1.1 christos (conditional-check-int-condition-code cck ls OP_6A OPE4_0 Ils "check integer cc less or equal unsigned") 6698 1.1 christos (conditional-check-int-condition-code cck hi OP_6A OPE4_0 Ihi "check integer cc greater unsigned") 6699 1.1 christos (conditional-check-int-condition-code cck c OP_6A OPE4_0 Ic "check integer cc carry set") 6700 1.1 christos (conditional-check-int-condition-code cck nc OP_6A OPE4_0 Inc "check integer cc carry clear") 6701 1.1 christos (conditional-check-int-condition-code cck n OP_6A OPE4_0 In "check integer cc negative") 6702 1.1 christos (conditional-check-int-condition-code cck p OP_6A OPE4_0 Ip "check integer cc positive") 6703 1.1 christos (conditional-check-int-condition-code cck v OP_6A OPE4_0 Iv "check integer cc overflow set") 6704 1.1 christos (conditional-check-int-condition-code cck nv OP_6A OPE4_0 Inv "check integer cc overflow clear") 6705 1.1 christos 6706 1.1 christos (define-pmacro (conditional-check-float-condition-code prefix cc op ope test comment) 6707 1.1 christos (dni (.sym prefix cc) 6708 1.1 christos (comment) 6709 1.1 christos ((UNIT B01) (FR500-MAJOR B-5) (FR550-MAJOR B-5) 6710 1.1 christos (FR400-MAJOR B-5) (FR450-MAJOR B-5) CONDITIONAL FR-ACCESS) 6711 1.1 christos (.str (.sym prefix cc) "$pack $FCCi_3,$CRj_float,$CCi,$cond") 6712 1.1 christos (+ pack (.sym FCC_ cc) CRj_float op (rs-null) CCi cond ope 6713 1.1 christos (misc-null-9) FCCi_3) 6714 1.1 christos (if (eq CCi (or cond 2)) 6715 1.1 christos (check-semantics (test FCCi_3) CRj_float) 6716 1.1 christos (set CRj_float (cr-undefined))) 6717 1.1 christos ((fr400 (unit u-check)) (fr450 (unit u-check)) 6718 1.1 christos (fr500 (unit u-check)) (fr550 (unit u-check))) 6719 1.1 christos ) 6720 1.1 christos ) 6721 1.1 christos 6722 1.1 christos (dni cfckra 6723 1.1 christos "conditional check float cc always" 6724 1.1 christos ((UNIT B01) (FR500-MAJOR B-5) (FR550-MAJOR B-5) 6725 1.1 christos (FR400-MAJOR B-5) (FR450-MAJOR B-5) CONDITIONAL FR-ACCESS) 6726 1.1 christos "cfckra$pack $CRj_float,$CCi,$cond" 6727 1.1 christos (+ pack FCC_ra CRj_float OP_6A (rs-null) CCi cond OPE4_1 6728 1.1 christos (misc-null-9) (FCCi_3-null)) 6729 1.1 christos (if (eq CCi (or cond 2)) 6730 1.1 christos (check-semantics (const BI 1) CRj_float) 6731 1.1 christos (set CRj_float (cr-undefined))) 6732 1.1 christos ((fr400 (unit u-check)) (fr450 (unit u-check)) 6733 1.1 christos (fr500 (unit u-check)) (fr550 (unit u-check))) 6734 1.1 christos ) 6735 1.1 christos 6736 1.1 christos (dni cfckno 6737 1.1 christos "conditional check float cc never" 6738 1.1 christos ((UNIT B01) (FR500-MAJOR B-5) (FR550-MAJOR B-5) 6739 1.1 christos (FR400-MAJOR B-5) (FR450-MAJOR B-5) CONDITIONAL FR-ACCESS) 6740 1.1 christos "cfckno$pack $CRj_float,$CCi,$cond" 6741 1.1 christos (+ pack FCC_nev CRj_float OP_6A (rs-null) CCi cond OPE4_1 6742 1.1 christos (misc-null-9) (FCCi_3-null)) 6743 1.1 christos (if (eq CCi (or cond 2)) 6744 1.1 christos (check-semantics (const BI 0) CRj_float) 6745 1.1 christos (set CRj_float (cr-undefined))) 6746 1.1 christos ((fr400 (unit u-check)) (fr450 (unit u-check)) 6747 1.1 christos (fr500 (unit u-check)) (fr550 (unit u-check))) 6748 1.1 christos ) 6749 1.1 christos 6750 1.1 christos (conditional-check-float-condition-code cfck ne OP_6A OPE4_1 Fne "check float cc not equal") 6751 1.1 christos (conditional-check-float-condition-code cfck eq OP_6A OPE4_1 Feq "check float cc equal") 6752 1.1 christos (conditional-check-float-condition-code cfck lg OP_6A OPE4_1 Flg "check float cc greater or less") 6753 1.1 christos (conditional-check-float-condition-code cfck ue OP_6A OPE4_1 Fue "check float cc unordered or equal") 6754 1.1 christos (conditional-check-float-condition-code cfck ul OP_6A OPE4_1 Ful "check float cc unordered or less") 6755 1.1 christos (conditional-check-float-condition-code cfck ge OP_6A OPE4_1 Fge "check float cc greater or equal") 6756 1.1 christos (conditional-check-float-condition-code cfck lt OP_6A OPE4_1 Flt "check float cc less") 6757 1.1 christos (conditional-check-float-condition-code cfck uge OP_6A OPE4_1 Fuge "check float cc unordered greater or equal") 6758 1.1 christos (conditional-check-float-condition-code cfck ug OP_6A OPE4_1 Fug "check float cc unordered or greater") 6759 1.1 christos (conditional-check-float-condition-code cfck le OP_6A OPE4_1 Fle "check float cc less or equal") 6760 1.1 christos (conditional-check-float-condition-code cfck gt OP_6A OPE4_1 Fgt "check float cc greater") 6761 1.1 christos (conditional-check-float-condition-code cfck ule OP_6A OPE4_1 Fule "check float cc unordered less or equal") 6762 1.1 christos (conditional-check-float-condition-code cfck u OP_6A OPE4_1 Fu "check float cc unordered") 6763 1.1 christos (conditional-check-float-condition-code cfck o OP_6A OPE4_1 Fo "check float cc ordered") 6764 1.1 christos 6765 1.1 christos (dni cjmpl 6766 1.1 christos "conditional jump and link" 6767 1.1 christos ((UNIT I0) (FR500-MAJOR I-5) (FR550-MAJOR I-6) 6768 1.1 christos (FR400-MAJOR I-5) (FR450-MAJOR I-5) CONDITIONAL) 6769 1.1 christos "cjmpl$pack @($GRi,$GRj),$CCi,$cond" 6770 1.1 christos (+ pack (misc-null-1) (LI-off) OP_6A GRi CCi cond OPE4_2 GRj) 6771 1.1 christos (if (eq CCi (or cond 2)) 6772 1.1 christos (jump-and-link-semantics GRi GRj LI)) 6773 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 6774 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 6775 1.1 christos ) 6776 1.1 christos 6777 1.1 christos (dni ccalll 6778 1.1 christos "conditional call and link" 6779 1.1 christos ((UNIT I0) (FR500-MAJOR I-5) (FR550-MAJOR I-6) 6780 1.1 christos (FR400-MAJOR I-5) (FR450-MAJOR I-5) CONDITIONAL) 6781 1.1 christos "ccalll$pack @($GRi,$GRj),$CCi,$cond" 6782 1.1 christos (+ pack (misc-null-1) (LI-on) OP_6A GRi CCi cond OPE4_2 GRj) 6783 1.1 christos (if (eq CCi (or cond 2)) 6784 1.1 christos (jump-and-link-semantics GRi GRj LI)) 6785 1.1 christos ((fr400 (unit u-branch)) (fr450 (unit u-branch)) 6786 1.1 christos (fr500 (unit u-branch)) (fr550 (unit u-branch))) 6787 1.1 christos ) 6788 1.1 christos 6789 1.1 christos (define-pmacro (cache-invalidate name cache all op ope profile comment) 6790 1.1 christos (dni name 6791 1.1 christos (comment) 6792 1.1 christos ((UNIT C) (FR500-MAJOR C-2) (FR550-MAJOR C-2) 6793 1.1 christos (FR400-MAJOR C-2) (FR450-MAJOR C-2)) 6794 1.1 christos (.str name "$pack @($GRi,$GRj)") 6795 1.1 christos (+ pack (rd-null) op GRi ope GRj) 6796 1.1 christos (c-call VOID (.str "@cpu@_" cache "_cache_invalidate") (add GRi GRj) all) 6797 1.1 christos profile 6798 1.1 christos ) 6799 1.1 christos ) 6800 1.1 christos 6801 1.1 christos (cache-invalidate ici insn 0 OP_03 OPE1_38 6802 1.1 christos ((fr400 (unit u-ici)) (fr450 (unit u-ici)) 6803 1.1 christos (fr500 (unit u-ici)) (fr550 (unit u-ici))) 6804 1.1 christos "invalidate insn cache") 6805 1.1 christos (cache-invalidate dci data 0 OP_03 OPE1_3C 6806 1.1 christos ((fr400 (unit u-dci)) (fr450 (unit u-dci)) 6807 1.1 christos (fr500 (unit u-dci)) (fr550 (unit u-dci))) 6808 1.1 christos "invalidate data cache") 6809 1.1 christos 6810 1.1 christos (define-pmacro (cache-invalidate-entry name cache op ope profile comment) 6811 1.1 christos (dni name 6812 1.1 christos (comment) 6813 1.1 christos ((UNIT C) (MACH fr400,fr450,fr550) (FR550-MAJOR C-2) 6814 1.1 christos (FR400-MAJOR C-2) (FR450-MAJOR C-2)) 6815 1.1 christos (.str name "$pack @($GRi,$GRj),$ae") 6816 1.1 christos (+ pack (misc-null-1) ae op GRi ope GRj) 6817 1.1 christos (if (eq ae 0) 6818 1.1 christos (c-call VOID (.str "@cpu@_" cache "_cache_invalidate") (add GRi GRj) -1) ; Invalid ae setting for this insn 6819 1.1 christos (c-call VOID (.str "@cpu@_" cache "_cache_invalidate") (add GRi GRj) ae)) 6820 1.1 christos profile 6821 1.1 christos ) 6822 1.1 christos ) 6823 1.1 christos 6824 1.1 christos (cache-invalidate-entry icei insn OP_03 OPE1_39 6825 1.1 christos ((fr400 (unit u-ici)) (fr450 (unit u-ici)) 6826 1.1 christos (fr550 (unit u-ici))) 6827 1.1 christos "invalidate insn cache entry") 6828 1.1 christos (cache-invalidate-entry dcei data OP_03 OPE1_3A 6829 1.1 christos ((fr400 (unit u-dci)) (fr450 (unit u-dci)) 6830 1.1 christos (fr550 (unit u-dci))) 6831 1.1 christos "invalidate data cache entry") 6832 1.1 christos 6833 1.1 christos (dni dcf 6834 1.1 christos "Data cache flush" 6835 1.1 christos ((UNIT C) (FR500-MAJOR C-2) (FR550-MAJOR C-2) 6836 1.1 christos (FR400-MAJOR C-2) (FR450-MAJOR C-2)) 6837 1.1 christos "dcf$pack @($GRi,$GRj)" 6838 1.1 christos (+ pack (rd-null) OP_03 GRi OPE1_3D GRj) 6839 1.1 christos (c-call VOID "@cpu@_data_cache_flush" (add GRi GRj) 0) 6840 1.1 christos ((fr400 (unit u-dcf)) (fr450 (unit u-dcf)) 6841 1.1 christos (fr500 (unit u-dcf)) (fr550 (unit u-dcf))) 6842 1.1 christos ) 6843 1.1 christos 6844 1.1 christos (dni dcef 6845 1.1 christos "Data cache entry flush" 6846 1.1 christos ((UNIT C) (MACH fr400,fr450,fr550) (FR550-MAJOR C-2) 6847 1.1 christos (FR400-MAJOR C-2) (FR450-MAJOR C-2)) 6848 1.1 christos "dcef$pack @($GRi,$GRj),$ae" 6849 1.1 christos (+ pack (misc-null-1) ae OP_03 GRi OPE1_3B GRj) 6850 1.1 christos (if (eq ae 0) 6851 1.1 christos (c-call VOID "@cpu@_data_cache_flush" (add GRi GRj) -1) 6852 1.1 christos (c-call VOID "@cpu@_data_cache_flush" (add GRi GRj) ae)) 6853 1.1 christos ((fr400 (unit u-dcf)) (fr450 (unit u-dcf)) (fr550 (unit u-dcf))) 6854 1.1 christos ) 6855 1.1 christos 6856 1.1 christos (define-pmacro (write-TLB name insn op ope comment) 6857 1.1 christos (dni name 6858 1.1 christos (comment) 6859 1.1 christos ((UNIT C) (FR500-MAJOR C-2) (MACH frv) PRIVILEGED) 6860 1.1 christos (.str insn "$pack $GRk,@($GRi,$GRj)") 6861 1.1 christos (+ pack GRk op GRi ope GRj) 6862 1.1 christos (nop) ; for now 6863 1.1 christos () 6864 1.1 christos ) 6865 1.1 christos ) 6866 1.1 christos 6867 1.1 christos (write-TLB witlb witlb OP_03 OPE1_32 "write for insn TLB") 6868 1.1 christos (write-TLB wdtlb wdtlb OP_03 OPE1_36 "write for data TLB") 6869 1.1 christos 6870 1.1 christos (define-pmacro (invalidate-TLB name insn op ope comment) 6871 1.1 christos (dni name 6872 1.1 christos (comment) 6873 1.1 christos ((UNIT C) (FR500-MAJOR C-2) (MACH frv) PRIVILEGED) 6874 1.1 christos (.str insn "$pack @($GRi,$GRj)") 6875 1.1 christos (+ pack (rd-null) op GRi ope GRj) 6876 1.1 christos (nop) ; for now 6877 1.1 christos () 6878 1.1 christos ) 6879 1.1 christos ) 6880 1.1 christos 6881 1.1 christos (invalidate-TLB itlbi itlbi OP_03 OPE1_33 "invalidate insn TLB") 6882 1.1 christos (invalidate-TLB dtlbi dtlbi OP_03 OPE1_37 "invalidate data TLB") 6883 1.1 christos 6884 1.1 christos (define-pmacro (cache-preload name cache pipe attrs op ope profile comment) 6885 1.1 christos (dni name 6886 1.1 christos (comment) 6887 1.1 christos (.splice (UNIT pipe) (FR500-MAJOR C-2) 6888 1.1 christos (FR400-MAJOR C-2) (.unsplice attrs)) 6889 1.1 christos (.str name "$pack $GRi,$GRj,$lock") 6890 1.1 christos (+ pack (misc-null-1) lock op GRi ope GRj) 6891 1.1 christos (c-call VOID (.str "@cpu@_" cache "_cache_preload") GRi GRj lock) 6892 1.1 christos profile 6893 1.1 christos ) 6894 1.1 christos ) 6895 1.1 christos 6896 1.1 christos (cache-preload icpl insn C ((FR550-MAJOR C-2) (FR450-MAJOR C-2)) OP_03 OPE1_30 6897 1.1 christos ((fr400 (unit u-icpl)) (fr450 (unit u-icpl)) 6898 1.1 christos (fr500 (unit u-icpl)) (fr550 (unit u-icpl))) 6899 1.1 christos "preload insn cache") 6900 1.1 christos (cache-preload dcpl data DCPL ((FR550-MAJOR I-8) (FR450-MAJOR I-2)) OP_03 OPE1_34 6901 1.1 christos ((fr400 (unit u-dcpl)) (fr450 (unit u-dcpl)) 6902 1.1 christos (fr500 (unit u-dcpl)) (fr550 (unit u-dcpl))) 6903 1.1 christos "preload data cache") 6904 1.1 christos 6905 1.1 christos (define-pmacro (cache-unlock name cache op ope profile comment) 6906 1.1 christos (dni name 6907 1.1 christos (comment) 6908 1.1 christos ((UNIT C) (FR500-MAJOR C-2) (FR550-MAJOR C-2) 6909 1.1 christos (FR400-MAJOR C-2) (FR450-MAJOR C-2)) 6910 1.1 christos (.str name "$pack $GRi") 6911 1.1 christos (+ pack (rd-null) op GRi ope (GRj-null)) 6912 1.1 christos (c-call VOID (.str "@cpu@_" cache "_cache_unlock") GRi) 6913 1.1 christos profile 6914 1.1 christos ) 6915 1.1 christos ) 6916 1.1 christos 6917 1.1 christos (cache-unlock icul insn OP_03 OPE1_31 6918 1.1 christos ((fr400 (unit u-icul)) (fr450 (unit u-icul)) 6919 1.1 christos (fr500 (unit u-icul)) (fr550 (unit u-icul))) 6920 1.1 christos "unlock insn cache") 6921 1.1 christos (cache-unlock dcul data OP_03 OPE1_35 6922 1.1 christos ((fr400 (unit u-dcul)) (fr450 (unit u-dcul)) 6923 1.1 christos (fr500 (unit u-dcul)) (fr550 (unit u-dcul))) 6924 1.1 christos "unlock data cache") 6925 1.1 christos 6926 1.1 christos (define-pmacro (barrier name insn op ope profile comment) 6927 1.1 christos (dni name 6928 1.1 christos (comment) 6929 1.1 christos ((UNIT C) (FR500-MAJOR C-2) (FR550-MAJOR C-2) 6930 1.1 christos (FR400-MAJOR C-2) (FR450-MAJOR C-2)) 6931 1.1 christos (.str insn "$pack") 6932 1.1 christos (+ pack (rd-null) op (rs-null) ope (GRj-null)) 6933 1.1 christos (nop) ; sufficient implementation 6934 1.1 christos profile 6935 1.1 christos ) 6936 1.1 christos ) 6937 1.1 christos 6938 1.1 christos (barrier bar bar OP_03 OPE1_3E 6939 1.1 christos ((fr400 (unit u-barrier)) (fr450 (unit u-barrier)) 6940 1.1 christos (fr500 (unit u-barrier))) 6941 1.1 christos "barrier") 6942 1.1 christos (barrier membar membar OP_03 OPE1_3F 6943 1.1 christos ((fr400 (unit u-membar)) (fr450 (unit u-membar)) 6944 1.1 christos (fr500 (unit u-membar))) 6945 1.1 christos "memory barrier") 6946 1.1 christos 6947 1.1 christos ; Load real address instructions 6948 1.1 christos (define-pmacro (load-real-address name insn what op ope) 6949 1.1 christos (dni name 6950 1.1 christos (.str "Load real address of " what) 6951 1.1 christos ((UNIT C) (FR450-MAJOR C-2) (MACH fr450)) 6952 1.1 christos (.str insn "$pack $GRi,$GRk,$LRAE,$LRAD,$LRAS") 6953 1.1 christos (+ pack GRk op GRi ope LRAE LRAD LRAS (LRA-null)) 6954 1.1 christos (nop) ; not simulated 6955 1.1 christos () 6956 1.1 christos ) 6957 1.1 christos ) 6958 1.1 christos 6959 1.1 christos (load-real-address lrai "lrai" "instruction" OP_03 OPE1_20) 6960 1.1 christos (load-real-address lrad "lrad" "data" OP_03 OPE1_21) 6961 1.1 christos 6962 1.1 christos (dni tlbpr 6963 1.1 christos "TLB Probe" 6964 1.1 christos ((UNIT C) (FR450-MAJOR C-2) (MACH fr450)) 6965 1.1 christos "tlbpr$pack $GRi,$GRj,$TLBPRopx,$TLBPRL" 6966 1.1 christos (+ pack (TLBPR-null) TLBPRopx TLBPRL OP_03 GRi OPE1_24 GRj) 6967 1.1 christos (nop) ; not simulated 6968 1.1 christos () 6969 1.1 christos ) 6970 1.1 christos 6971 1.1 christos ; Coprocessor operations 6972 1.1 christos (define-pmacro (cop-op num op) 6973 1.1 christos (dni (.sym cop num) 6974 1.1 christos "Coprocessor operation" 6975 1.1 christos ((UNIT C) (FR500-MAJOR C-2) (MACH frv)) 6976 1.1 christos (.str "cop" num "$pack $s6_1,$CPRi,$CPRj,$CPRk") 6977 1.1 christos (+ pack CPRk op CPRi s6_1 CPRj) 6978 1.1 christos (nop) ; sufficient implementation 6979 1.1 christos () 6980 1.1 christos ) 6981 1.1 christos ) 6982 1.1 christos 6983 1.1 christos (cop-op 1 OP_7E) 6984 1.1 christos (cop-op 2 OP_7F) 6985 1.1 christos 6986 1.1 christos (define-pmacro (clear-ne-flag-semantics target_index is_float) 6987 1.1 christos (c-call VOID "@cpu@_clear_ne_flags" target_index is_float) 6988 1.1 christos ) 6989 1.1 christos 6990 1.1 christos (define-pmacro (clear-ne-flag-r name op ope reg is_float attr profile comment) 6991 1.1 christos (dni name 6992 1.1 christos (comment) 6993 1.1 christos ((UNIT I01) (FR500-MAJOR I-6) (FR550-MAJOR I-7) (MACH simple,tomcat,fr500,fr550,frv) attr) 6994 1.1 christos (.str name "$pack $" reg "k") 6995 1.1 christos (+ pack (.sym reg k) op (rs-null) ope (GRj-null)) 6996 1.1 christos (sequence () 6997 1.1 christos ; hack to get this referenced for profiling 6998 1.1 christos (c-raw-call VOID "frv_ref_SI" (.sym reg k)) 6999 1.1 christos (clear-ne-flag-semantics (index-of (.sym reg k)) is_float)) 7000 1.1 christos profile 7001 1.1 christos ) 7002 1.1 christos ) 7003 1.1 christos 7004 1.1 christos (clear-ne-flag-r clrgr OP_0A OPE1_00 GR 0 NA 7005 1.1 christos ((fr500 (unit u-clrgr)) (fr550 (unit u-clrgr))) 7006 1.1 christos "Clear GR NE flag") 7007 1.1 christos (clear-ne-flag-r clrfr OP_0A OPE1_02 FR 1 FR-ACCESS 7008 1.1 christos ((fr500 (unit u-clrfr)) (fr550 (unit u-clrfr))) 7009 1.1 christos "Clear FR NE flag") 7010 1.1 christos 7011 1.1 christos (define-pmacro (clear-ne-flag-all name op ope is_float attr profile comment) 7012 1.1 christos (dni name 7013 1.1 christos (comment) 7014 1.1 christos ((UNIT I01) (FR500-MAJOR I-6) (FR550-MAJOR I-7) (MACH simple,tomcat,fr500,fr550,frv) attr) 7015 1.1 christos (.str name "$pack") 7016 1.1 christos (+ pack (rd-null) op (rs-null) ope (GRj-null)) 7017 1.1 christos (clear-ne-flag-semantics -1 is_float) 7018 1.1 christos profile 7019 1.1 christos ) 7020 1.1 christos ) 7021 1.1 christos 7022 1.1 christos (clear-ne-flag-all clrga OP_0A OPE1_01 0 NA 7023 1.1 christos ((fr500 (unit u-clrgr)) (fr550 (unit u-clrgr))) 7024 1.1 christos "Clear GR NE flag ALL") 7025 1.1 christos (clear-ne-flag-all clrfa OP_0A OPE1_03 1 FR-ACCESS 7026 1.1 christos ((fr500 (unit u-clrfr)) (fr550 (unit u-clrfr))) 7027 1.1 christos "Clear FR NE flag ALL") 7028 1.1 christos 7029 1.1 christos (define-pmacro (commit-semantics target_index is_float) 7030 1.1 christos (c-call VOID "@cpu@_commit" target_index is_float) 7031 1.1 christos ) 7032 1.1 christos 7033 1.1 christos (define-pmacro (commit-r name op ope reg is_float attr comment) 7034 1.1 christos (dni name 7035 1.1 christos (comment) 7036 1.1 christos ((UNIT I01) (FR500-MAJOR I-6) (FR550-MAJOR I-7) (MACH frv,fr500,fr550) attr) 7037 1.1 christos (.str name "$pack $" reg "k") 7038 1.1 christos (+ pack (.sym reg k) op (rs-null) ope (GRj-null)) 7039 1.1 christos (commit-semantics (index-of (.sym reg k)) is_float) 7040 1.1 christos ((fr500 (unit u-commit)) (fr550 (unit u-commit))) 7041 1.1 christos ) 7042 1.1 christos ) 7043 1.1 christos 7044 1.1 christos (commit-r commitgr OP_0A OPE1_04 GR 0 NA "commit exceptions, specific GR") 7045 1.1 christos (commit-r commitfr OP_0A OPE1_06 FR 1 FR-ACCESS "commit exceptions, specific FR") 7046 1.1 christos 7047 1.1 christos (define-pmacro (commit name op ope is_float attr comment) 7048 1.1 christos (dni name 7049 1.1 christos (comment) 7050 1.1 christos ((UNIT I01) (FR500-MAJOR I-6) (FR550-MAJOR I-7) (MACH frv,fr500,fr550) attr) 7051 1.1 christos (.str name "$pack") 7052 1.1 christos (+ pack (rd-null) op (rs-null) ope (GRj-null)) 7053 1.1 christos (commit-semantics -1 is_float) 7054 1.1 christos ((fr500 (unit u-commit)) (fr550 (unit u-commit))) 7055 1.1 christos ) 7056 1.1 christos ) 7057 1.1 christos 7058 1.1 christos (commit commitga OP_0A OPE1_05 0 NA "commit exceptions, any GR") 7059 1.1 christos (commit commitfa OP_0A OPE1_07 1 FR-ACCESS "commit exceptions, any FR") 7060 1.1 christos 7061 1.1 christos (define-pmacro (floating-point-conversion 7062 1.1 christos name op ope conv mode src targ attr comment) 7063 1.1 christos (dni name 7064 1.1 christos (comment) 7065 1.1 christos (.splice (UNIT FMALL) (FR500-MAJOR F-1) (.unsplice attr)) 7066 1.1 christos (.str name "$pack $" src ",$" targ) 7067 1.1 christos (+ pack targ op (rs-null) ope src) 7068 1.1 christos (set targ (conv mode FPCONV-DEFAULT src)) 7069 1.1 christos ((fr500 (unit u-float-convert)) (fr550 (unit u-float-convert))) 7070 1.1 christos ) 7071 1.1 christos ) 7072 1.1 christos 7073 1.1 christos (floating-point-conversion fitos OP_79 OPE1_00 float SF FRintj FRk 7074 1.1 christos ((FR550-MAJOR F-2) (MACH simple,tomcat,fr500,fr550,frv)) 7075 1.1 christos "Convert Integer to Single") 7076 1.1 christos (floating-point-conversion fstoi OP_79 OPE1_01 fix SI FRj FRintk 7077 1.1 christos ((FR550-MAJOR F-2) (MACH simple,tomcat,fr500,fr550,frv)) 7078 1.1 christos "Convert Single to Integer") 7079 1.1 christos (floating-point-conversion fitod OP_7A OPE1_00 float DF FRintj FRdoublek 7080 1.1 christos ((MACH frv)) 7081 1.1 christos "Convert Integer to Double") 7082 1.1 christos (floating-point-conversion fdtoi OP_7A OPE1_01 fix SI FRdoublej FRintk 7083 1.1 christos ((MACH frv)) 7084 1.1 christos "Convert Double to Integer") 7085 1.1 christos 7086 1.1 christos (define-pmacro (floating-point-dual-conversion 7087 1.1 christos name op ope conv mode src src_hw targ targ_hw attr comment) 7088 1.1 christos (dni name 7089 1.1 christos (comment) 7090 1.1 christos ((MACH frv) (UNIT FMALL) (FR500-MAJOR F-1) attr) 7091 1.1 christos (.str name "$pack $" src ",$" targ) 7092 1.1 christos (+ pack targ op (rs-null) ope src) 7093 1.1 christos (sequence () 7094 1.1 christos (set targ (conv mode FPCONV-DEFAULT src)) 7095 1.1 christos (set (nextreg targ_hw targ 1) 7096 1.1 christos (conv mode FPCONV-DEFAULT (nextreg src_hw src 1)))) 7097 1.1 christos ((fr500 (unit u-float-dual-convert))) 7098 1.1 christos ) 7099 1.1 christos ) 7100 1.1 christos 7101 1.1 christos (floating-point-dual-conversion fditos OP_79 OPE1_10 float SF FRintj h-fr_int FRk h-fr NA "Dual Convert Integer to Single") 7102 1.1 christos (floating-point-dual-conversion fdstoi OP_79 OPE1_11 fix SI FRj h-fr FRintk h-fr_int NA "Dual Convert Single to Integer") 7103 1.1 christos 7104 1.1 christos (define-pmacro (ne-floating-point-dual-conversion 7105 1.1 christos name op ope conv mode src src_hw targ targ_hw attr comment) 7106 1.1 christos (dni name 7107 1.1 christos (comment) 7108 1.1 christos ((MACH frv) (UNIT FMALL) (FR500-MAJOR F-1) NON-EXCEPTING attr) 7109 1.1 christos (.str name "$pack $" src ",$" targ) 7110 1.1 christos (+ pack targ op (rs-null) ope src) 7111 1.1 christos (sequence () 7112 1.1 christos (c-call VOID "@cpu@_set_ne_index" (index-of targ)) 7113 1.1 christos (set targ (conv mode FPCONV-DEFAULT src)) 7114 1.1 christos (c-call VOID "@cpu@_set_ne_index" (add (index-of targ) 1)) 7115 1.1 christos (set (nextreg targ_hw targ 1) 7116 1.1 christos (conv mode FPCONV-DEFAULT (nextreg src_hw src 1)))) 7117 1.1 christos ((fr500 (unit u-float-dual-convert))) 7118 1.1 christos ) 7119 1.1 christos ) 7120 1.1 christos 7121 1.1 christos (ne-floating-point-dual-conversion nfditos OP_79 OPE1_30 float SF FRintj h-fr_int FRk h-fr NA "Non excepting dual Convert Integer to Single") 7122 1.1 christos (ne-floating-point-dual-conversion nfdstoi OP_79 OPE1_31 fix SI FRj h-fr FRintk h-fr_int NA "Non excepting dual Convert Single to Integer") 7123 1.1 christos 7124 1.1 christos (define-pmacro (conditional-floating-point-conversion 7125 1.1 christos name op ope conv mode src targ comment) 7126 1.1 christos (dni name 7127 1.1 christos (comment) 7128 1.1 christos ((UNIT FMALL) (FR500-MAJOR F-1) (FR550-MAJOR F-2) (MACH simple,tomcat,fr500,fr550,frv)) 7129 1.1 christos (.str name "$pack $" src ",$" targ ",$CCi,$cond") 7130 1.1 christos (+ pack targ op (rs-null) CCi cond ope src) 7131 1.1 christos (if (eq CCi (or cond 2)) 7132 1.1 christos (set targ (conv mode FPCONV-DEFAULT src))) 7133 1.1 christos ((fr500 (unit u-float-convert)) (fr550 (unit u-float-convert))) 7134 1.1 christos ) 7135 1.1 christos ) 7136 1.1 christos 7137 1.1 christos (conditional-floating-point-conversion cfitos OP_6B OPE4_0 float SF FRintj FRk "Conditional convert Integer to Single") 7138 1.1 christos (conditional-floating-point-conversion cfstoi OP_6B OPE4_1 fix SI FRj FRintk "Conditional convert Single to Integer") 7139 1.1 christos 7140 1.1 christos (define-pmacro (ne-floating-point-conversion 7141 1.1 christos name op ope conv mode src targ comment) 7142 1.1 christos (dni name 7143 1.1 christos (comment) 7144 1.1 christos ((UNIT FMALL) (FR500-MAJOR F-1) (FR550-MAJOR F-2) (MACH simple,tomcat,fr500,fr550,frv)) 7145 1.1 christos (.str name "$pack $" src ",$" targ) 7146 1.1 christos (+ pack targ op (rs-null) ope src) 7147 1.1 christos (sequence () 7148 1.1 christos (c-call VOID "@cpu@_set_ne_index" (index-of targ)) 7149 1.1 christos (set targ (conv mode FPCONV-DEFAULT src))) 7150 1.1 christos ((fr500 (unit u-float-convert)) (fr550 (unit u-float-convert))) 7151 1.1 christos ) 7152 1.1 christos ) 7153 1.1 christos 7154 1.1 christos (ne-floating-point-conversion nfitos OP_79 OPE1_20 float SF FRintj FRk "NE convert Integer to Single") 7155 1.1 christos (ne-floating-point-conversion nfstoi OP_79 OPE1_21 fix SI FRj FRintk "NE convert Single to Integer") 7156 1.1 christos 7157 1.1 christos (register-transfer fmovs OP_79 OPE1_02 7158 1.1 christos FRj FRk FMALL 7159 1.1 christos ((FR500-MAJOR F-1) (FR550-MAJOR F-2) (MACH simple,tomcat,fr500,fr550,frv)) 7160 1.1 christos ((fr500 (unit u-fr2fr))) 7161 1.1 christos "Move Single Float") 7162 1.1 christos (register-transfer fmovd OP_7A OPE1_02 7163 1.1 christos ; TODO -- unit doesn't handle extra register 7164 1.1 christos FRdoublej FRdoublek FM01 7165 1.1 christos ((FR500-MAJOR F-1) (MACH frv)) 7166 1.1 christos ((fr500 (unit u-fr2fr)) (fr550 (unit u-fr2fr))) 7167 1.1 christos "Move Double Float") 7168 1.1 christos 7169 1.1 christos (dni fdmovs 7170 1.1 christos "Dual move single float" 7171 1.1 christos ((MACH frv) (UNIT FMALL) (FR500-MAJOR F-1)) 7172 1.1 christos "fdmovs$pack $FRj,$FRk" 7173 1.1 christos (+ pack FRk OP_79 (rs-null) OPE1_12 FRj) 7174 1.1 christos (sequence () 7175 1.1 christos (set FRk FRj) 7176 1.1 christos (set (nextreg h-fr FRk 1) (nextreg h-fr FRj 1))) 7177 1.1 christos ; TODO -- unit doesn't handle extra register 7178 1.1 christos ((fr500 (unit u-fr2fr))) 7179 1.1 christos ) 7180 1.1 christos 7181 1.1 christos (conditional-register-transfer cfmovs OP_6C OPE4_0 FRj FRk FMALL 7182 1.1 christos ((FR500-MAJOR F-1) (FR550-MAJOR F-2) 7183 1.1 christos (MACH simple,tomcat,fr500,fr550,frv)) 7184 1.1 christos ((fr500 (unit u-fr2fr)) (fr550 (unit u-fr2fr))) 7185 1.1 christos "Conditional move Single Float") 7186 1.1 christos 7187 1.1 christos (define-pmacro (floating-point-neg name src targ op ope attr comment) 7188 1.1 christos (dni name 7189 1.1 christos (comment) 7190 1.1 christos (.splice (UNIT FMALL) (FR500-MAJOR F-1) (.unsplice attr)) 7191 1.1 christos (.str name "$pack $" src ",$" targ) 7192 1.1 christos (+ pack src op (rs-null) ope targ) 7193 1.1 christos (set targ (neg src)) 7194 1.1 christos ((fr500 (unit u-float-arith)) (fr550 (unit u-float-arith))) 7195 1.1 christos ) 7196 1.1 christos ) 7197 1.1 christos 7198 1.1 christos (floating-point-neg fnegs FRj FRk OP_79 OPE1_03 ((FR550-MAJOR F-2) (MACH simple,tomcat,fr500,fr550,frv)) "Floating point negate, single") 7199 1.1 christos (floating-point-neg fnegd FRdoublej FRdoublek OP_7A OPE1_03 ((MACH frv)) "Floating point negate, double") 7200 1.1 christos 7201 1.1 christos (dni fdnegs 7202 1.1 christos "Floating point dual negate, single" 7203 1.1 christos ((MACH frv) (UNIT FMALL) (FR500-MAJOR F-1)) 7204 1.1 christos "fdnegs$pack $FRj,$FRk" 7205 1.1 christos (+ pack FRk OP_79 (rs-null) OPE1_13 FRj) 7206 1.1 christos (sequence () 7207 1.1 christos (set FRk (neg FRj)) 7208 1.1 christos (set (nextreg h-fr FRk 1) (neg (nextreg h-fr FRj 1)))) 7209 1.1 christos ((fr500 (unit u-float-dual-arith))) 7210 1.1 christos ) 7211 1.1 christos 7212 1.1 christos (dni cfnegs 7213 1.1 christos "Conditional floating point negate, single" 7214 1.1 christos ((UNIT FMALL) (FR500-MAJOR F-1) (FR550-MAJOR F-2) (MACH simple,tomcat,fr500,fr550,frv)) 7215 1.1 christos "cfnegs$pack $FRj,$FRk,$CCi,$cond" 7216 1.1 christos (+ pack FRj OP_6C (rs-null) CCi cond OPE4_1 FRk) 7217 1.1 christos (if (eq CCi (or cond 2)) 7218 1.1 christos (set FRk (neg FRj))) 7219 1.1 christos ((fr500 (unit u-float-arith)) (fr550 (unit u-float-arith))) 7220 1.1 christos ) 7221 1.1 christos 7222 1.1 christos (define-pmacro (float-abs name src targ op ope attr comment) 7223 1.1 christos (dni name 7224 1.1 christos (comment) 7225 1.1 christos (.splice (UNIT FMALL) (FR500-MAJOR F-1) (.unsplice attr)) 7226 1.1 christos (.str name "$pack $" src ",$" targ ) 7227 1.1 christos (+ pack targ op (rs-null) ope src) 7228 1.1 christos (set targ (abs src)) 7229 1.1 christos ((fr500 (unit u-float-arith)) (fr550 (unit u-float-arith))) 7230 1.1 christos ) 7231 1.1 christos ) 7232 1.1 christos 7233 1.1 christos (float-abs fabss FRj FRk OP_79 OPE1_04 ((FR550-MAJOR F-2) (MACH simple,tomcat,fr500,fr550,frv)) "Float absolute value, single") 7234 1.1 christos (float-abs fabsd FRdoublej FRdoublek OP_7A OPE1_04 ((MACH frv)) "Float absolute value, double") 7235 1.1 christos 7236 1.1 christos (dni fdabss 7237 1.1 christos "Floating point dual absolute value, single" 7238 1.1 christos ((MACH frv) (UNIT FMALL) (FR500-MAJOR F-1)) 7239 1.1 christos "fdabss$pack $FRj,$FRk" 7240 1.1 christos (+ pack FRk OP_79 (rs-null) OPE1_14 FRj) 7241 1.1 christos (sequence () 7242 1.1 christos (set FRk (abs FRj)) 7243 1.1 christos (set (nextreg h-fr FRk 1) (abs (nextreg h-fr FRj 1)))) 7244 1.1 christos ((fr500 (unit u-float-dual-arith))) 7245 1.1 christos ) 7246 1.1 christos 7247 1.1 christos (dni cfabss 7248 1.1 christos "Conditional floating point absolute value, single" 7249 1.1 christos ((UNIT FMALL) (FR500-MAJOR F-1) (FR550-MAJOR F-2) (MACH simple,tomcat,fr500,fr550,frv)) 7250 1.1 christos "cfabss$pack $FRj,$FRk,$CCi,$cond" 7251 1.1 christos (+ pack FRj OP_6C (rs-null) CCi cond OPE4_2 FRk) 7252 1.1 christos (if (eq CCi (or cond 2)) 7253 1.1 christos (set FRk (abs FRj))) 7254 1.1 christos ((fr500 (unit u-float-arith)) (fr550 (unit u-float-arith))) 7255 1.1 christos ) 7256 1.1 christos 7257 1.1 christos (dni fsqrts 7258 1.1 christos "Square root single" 7259 1.1 christos ((UNIT FM01) (FR500-MAJOR F-4) (FR550-MAJOR F-3) (MACH simple,tomcat,fr500,fr550,frv)) 7260 1.1 christos "fsqrts$pack $FRj,$FRk" 7261 1.1 christos (+ pack FRk OP_79 (rs-null) OPE1_05 FRj) 7262 1.1 christos (set FRk (sqrt SF FRj)) 7263 1.1 christos ((fr500 (unit u-float-sqrt)) (fr550 (unit u-float-sqrt))) 7264 1.1 christos ) 7265 1.1 christos 7266 1.1 christos (dni fdsqrts 7267 1.1 christos "Dual square root single" 7268 1.1 christos ((MACH frv) (UNIT FM01) (FR500-MAJOR F-4)) 7269 1.1 christos "fdsqrts$pack $FRj,$FRk" 7270 1.1 christos (+ pack FRk OP_79 (rs-null) OPE1_15 FRj) 7271 1.1 christos (sequence () 7272 1.1 christos (set FRk (sqrt SF FRj)) 7273 1.1 christos (set (nextreg h-fr FRk 1) (sqrt (nextreg h-fr FRj 1)))) 7274 1.1 christos ((fr500 (unit u-float-dual-sqrt))) 7275 1.1 christos ) 7276 1.1 christos 7277 1.1 christos (dni nfdsqrts 7278 1.1 christos "Non excepting Dual square root single" 7279 1.1 christos ((MACH frv) (UNIT FM01) (FR500-MAJOR F-4) NON-EXCEPTING) 7280 1.1 christos "nfdsqrts$pack $FRj,$FRk" 7281 1.1 christos (+ pack FRk OP_79 (rs-null) OPE1_35 FRj) 7282 1.1 christos (sequence () 7283 1.1 christos (c-call VOID "@cpu@_set_ne_index" (index-of FRk)) 7284 1.1 christos (set FRk (sqrt SF FRj)) 7285 1.1 christos (c-call VOID "@cpu@_set_ne_index" (add (index-of FRk) 1)) 7286 1.1 christos (set (nextreg h-fr FRk 1) (sqrt (nextreg h-fr FRj 1)))) 7287 1.1 christos ((fr500 (unit u-float-dual-sqrt))) 7288 1.1 christos ) 7289 1.1 christos 7290 1.1 christos (dni fsqrtd 7291 1.1 christos "Square root double" 7292 1.1 christos ((UNIT FM01) (FR500-MAJOR F-4) (MACH frv)) 7293 1.1 christos "fsqrtd$pack $FRdoublej,$FRdoublek" 7294 1.1 christos (+ pack FRdoublek OP_7A (rs-null) OPE1_05 FRdoublej) 7295 1.1 christos (set FRdoublek (sqrt DF FRdoublej)) 7296 1.1 christos ((fr500 (unit u-float-sqrt))) 7297 1.1 christos ) 7298 1.1 christos 7299 1.1 christos (dni cfsqrts 7300 1.1 christos "Conditional square root single" 7301 1.1 christos ((UNIT FM01) (FR500-MAJOR F-4) (FR550-MAJOR F-3) (MACH simple,tomcat,fr500,fr550,frv)) 7302 1.1 christos "cfsqrts$pack $FRj,$FRk,$CCi,$cond" 7303 1.1 christos (+ pack FRk OP_6E (rs-null) CCi cond OPE4_2 FRj) 7304 1.1 christos (if (eq CCi (or cond 2)) 7305 1.1 christos (set FRk (sqrt SF FRj))) 7306 1.1 christos ((fr500 (unit u-float-sqrt)) (fr550 (unit u-float-sqrt))) 7307 1.1 christos ) 7308 1.1 christos 7309 1.1 christos (dni nfsqrts 7310 1.1 christos "Non exception square root, single" 7311 1.1 christos ((UNIT FM01) (FR500-MAJOR F-4) (FR550-MAJOR F-3) (MACH simple,tomcat,fr500,fr550,frv)) 7312 1.1 christos "nfsqrts$pack $FRj,$FRk" 7313 1.1 christos (+ pack FRk OP_79 (rs-null) OPE1_25 FRj) 7314 1.1 christos (sequence () 7315 1.1 christos (c-call VOID "@cpu@_set_ne_index" (index-of FRk)) 7316 1.1 christos (set FRk (sqrt SF FRj))) 7317 1.1 christos ((fr500 (unit u-float-sqrt)) (fr550 (unit u-float-sqrt))) 7318 1.1 christos ) 7319 1.1 christos 7320 1.1 christos (define-pmacro (float-binary-op-s name pipe attr operation op ope comment) 7321 1.1 christos (dni name 7322 1.1 christos (comment) 7323 1.1 christos (.splice (UNIT pipe) (MACH simple,tomcat,fr500,fr550,frv) (.unsplice attr)) 7324 1.1 christos (.str name "$pack $FRi,$FRj,$FRk") 7325 1.1 christos (+ pack FRk op FRi ope FRj) 7326 1.1 christos (set FRk (operation FRi FRj)) 7327 1.1 christos ((fr500 (unit u-float-arith)) (fr550 (unit u-float-arith))) 7328 1.1 christos ) 7329 1.1 christos ) 7330 1.1 christos 7331 1.1 christos (float-binary-op-s fadds FMALL ((FR500-MAJOR F-2) (FR550-MAJOR F-2)) add OP_79 OPE1_06 "add single float") 7332 1.1 christos (float-binary-op-s fsubs FMALL ((FR500-MAJOR F-2) (FR550-MAJOR F-2)) sub OP_79 OPE1_07 "sub single float") 7333 1.1 christos (float-binary-op-s fmuls FM01 ((FR500-MAJOR F-3) (FR550-MAJOR F-3)) mul OP_79 OPE1_08 "mul single float") 7334 1.1 christos 7335 1.1 christos (dni fdivs 7336 1.1 christos "div single float" 7337 1.1 christos ((UNIT FM01) (FR500-MAJOR F-4) (FR550-MAJOR F-3) (MACH simple,tomcat,fr500,fr550,frv)) 7338 1.1 christos "fdivs$pack $FRi,$FRj,$FRk" 7339 1.1 christos (+ pack FRk OP_79 FRi OPE1_09 FRj) 7340 1.1 christos (set FRk (div FRi FRj)) 7341 1.1 christos ((fr500 (unit u-float-div)) 7342 1.1 christos (fr550 (unit u-float-div))) 7343 1.1 christos ) 7344 1.1 christos 7345 1.1 christos (define-pmacro (float-binary-op-d name operation op ope major comment) 7346 1.1 christos (dni name 7347 1.1 christos (comment) 7348 1.1 christos ((UNIT FMALL) (FR500-MAJOR major) (MACH frv)) 7349 1.1 christos (.str name "$pack $FRdoublei,$FRdoublej,$FRdoublek") 7350 1.1 christos (+ pack FRdoublek op FRdoublei ope FRdoublej) 7351 1.1 christos (set FRdoublek (operation FRdoublei FRdoublej)) 7352 1.1 christos ((fr500 (unit u-float-arith))) 7353 1.1 christos ) 7354 1.1 christos ) 7355 1.1 christos 7356 1.1 christos (float-binary-op-d faddd add OP_7A OPE1_06 F-2 "add double float") 7357 1.1 christos (float-binary-op-d fsubd sub OP_7A OPE1_07 F-2 "sub double float") 7358 1.1 christos (float-binary-op-d fmuld mul OP_7A OPE1_08 F-3 "mul double float") 7359 1.1 christos (float-binary-op-d fdivd div OP_7A OPE1_09 F-4 "div double float") 7360 1.1 christos 7361 1.1 christos (define-pmacro (conditional-float-binary-op name pipe attr operation op ope profile comment) 7362 1.1 christos (dni name 7363 1.1 christos (comment) 7364 1.1 christos (.splice (UNIT pipe) (MACH simple,tomcat,fr500,fr550,frv) 7365 1.1 christos (.unsplice attr)) 7366 1.1 christos (.str name "$pack $FRi,$FRj,$FRk,$CCi,$cond") 7367 1.1 christos (+ pack FRk op FRi CCi cond ope FRj) 7368 1.1 christos (if (eq CCi (or cond 2)) 7369 1.1 christos (set FRk (operation FRi FRj))) 7370 1.1 christos profile 7371 1.1 christos ) 7372 1.1 christos ) 7373 1.1 christos 7374 1.1 christos (conditional-float-binary-op cfadds FMALL ((FR500-MAJOR F-2) (FR550-MAJOR F-2)) add OP_6D OPE4_0 7375 1.1 christos ((fr500 (unit u-float-arith)) (fr550 (unit u-float-arith))) 7376 1.1 christos "cond add single") 7377 1.1 christos (conditional-float-binary-op cfsubs FMALL ((FR500-MAJOR F-2) (FR550-MAJOR F-2)) sub OP_6D OPE4_1 7378 1.1 christos ((fr500 (unit u-float-arith)) (fr550 (unit u-float-arith))) 7379 1.1 christos "cond sub single") 7380 1.1 christos (conditional-float-binary-op cfmuls FM01 ((FR500-MAJOR F-3) (FR550-MAJOR F-3)) mul OP_6E OPE4_0 7381 1.1 christos ((fr500 (unit u-float-arith)) (fr550 (unit u-float-arith))) 7382 1.1 christos "cond mul single") 7383 1.1 christos (conditional-float-binary-op cfdivs FM01 ((FR500-MAJOR F-4) (FR550-MAJOR F-3)) div OP_6E OPE4_1 7384 1.1 christos ((fr500 (unit u-float-div)) (fr550 (unit u-float-div))) 7385 1.1 christos "cond div single") 7386 1.1 christos 7387 1.1 christos (define-pmacro (ne-float-binary-op name pipe attr operation op ope profile comment) 7388 1.1 christos (dni name 7389 1.1 christos (comment) 7390 1.1 christos (.splice (UNIT pipe) (MACH simple,tomcat,fr500,fr550,frv) 7391 1.1 christos (.unsplice attr)) 7392 1.1 christos (.str name "$pack $FRi,$FRj,$FRk") 7393 1.1 christos (+ pack FRk op FRi ope FRj) 7394 1.1 christos (sequence () 7395 1.1 christos (c-call VOID "@cpu@_set_ne_index" (index-of FRk)) 7396 1.1 christos (set FRk (operation FRi FRj))) 7397 1.1 christos profile 7398 1.1 christos ) 7399 1.1 christos ) 7400 1.1 christos 7401 1.1 christos (ne-float-binary-op nfadds FMALL ((FR500-MAJOR F-2) (FR550-MAJOR F-2)) add OP_79 OPE1_26 7402 1.1 christos ((fr500 (unit u-float-arith)) (fr550 (unit u-float-arith))) 7403 1.1 christos "ne add single") 7404 1.1 christos (ne-float-binary-op nfsubs FMALL ((FR500-MAJOR F-2) (FR550-MAJOR F-2)) sub OP_79 OPE1_27 7405 1.1 christos ((fr500 (unit u-float-arith)) (fr550 (unit u-float-arith))) 7406 1.1 christos "ne sub single") 7407 1.1 christos (ne-float-binary-op nfmuls FM01 ((FR500-MAJOR F-3) (FR550-MAJOR F-3)) mul OP_79 OPE1_28 7408 1.1 christos ((fr500 (unit u-float-arith)) (fr550 (unit u-float-arith))) 7409 1.1 christos "ne mul single") 7410 1.1 christos (ne-float-binary-op nfdivs FM01 ((FR500-MAJOR F-4) (FR550-MAJOR F-3)) div OP_79 OPE1_29 7411 1.1 christos ((fr500 (unit u-float-div)) (fr550 (unit u-float-div))) 7412 1.1 christos "ne div single") 7413 1.1 christos 7414 1.1 christos (define-pmacro (fcc-eq) 8) 7415 1.1 christos (define-pmacro (fcc-lt) 4) 7416 1.1 christos (define-pmacro (fcc-gt) 2) 7417 1.1 christos (define-pmacro (fcc-uo) 1) 7418 1.1 christos 7419 1.1 christos (define-pmacro (compare-and-set-fcc arg1 arg2 fcc) 7420 1.1 christos (if (gt arg1 arg2) 7421 1.1 christos (set fcc (fcc-gt)) 7422 1.1 christos (if (eq arg1 arg2) 7423 1.1 christos (set fcc (fcc-eq)) 7424 1.1 christos (if (lt arg1 arg2) 7425 1.1 christos (set fcc (fcc-lt)) 7426 1.1 christos (set fcc (fcc-uo))))) 7427 1.1 christos ) 7428 1.1 christos 7429 1.1 christos (dni fcmps 7430 1.1 christos "compare single float" 7431 1.1 christos ((UNIT FMALL) (FR500-MAJOR F-2) (FR550-MAJOR F-2) (MACH simple,tomcat,fr500,fr550,frv)) 7432 1.1 christos "fcmps$pack $FRi,$FRj,$FCCi_2" 7433 1.1 christos (+ pack (cond-null) FCCi_2 OP_79 FRi OPE1_0A FRj) 7434 1.1 christos (compare-and-set-fcc FRi FRj FCCi_2) 7435 1.1 christos ((fr500 (unit u-float-compare)) (fr550 (unit u-float-compare))) 7436 1.1 christos ) 7437 1.1 christos 7438 1.1 christos (dni fcmpd 7439 1.1 christos "compare double float" 7440 1.1 christos ((UNIT FMALL) (FR500-MAJOR F-2) (MACH frv)) 7441 1.1 christos "fcmpd$pack $FRdoublei,$FRdoublej,$FCCi_2" 7442 1.1 christos (+ pack (cond-null) FCCi_2 OP_7A FRdoublei OPE1_0A FRdoublej) 7443 1.1 christos (compare-and-set-fcc FRdoublei FRdoublej FCCi_2) 7444 1.1 christos ((fr500 (unit u-float-compare))) 7445 1.1 christos ) 7446 1.1 christos 7447 1.1 christos (dni cfcmps 7448 1.1 christos "Conditional compare single, float" 7449 1.1 christos ((UNIT FMALL) (FR500-MAJOR F-2) (FR550-MAJOR F-2) (MACH simple,tomcat,fr500,fr550,frv)) 7450 1.1 christos "cfcmps$pack $FRi,$FRj,$FCCi_2,$CCi,$cond" 7451 1.1 christos (+ pack (cond-null) FCCi_2 OP_6D FRi CCi cond OPE4_2 FRj) 7452 1.1 christos (if (eq CCi (or cond 2)) 7453 1.1 christos (compare-and-set-fcc FRi FRj FCCi_2)) 7454 1.1 christos ((fr500 (unit u-float-compare)) (fr550 (unit u-float-compare))) 7455 1.1 christos ) 7456 1.1 christos 7457 1.1 christos (dni fdcmps 7458 1.1 christos "float dual compare single" 7459 1.1 christos ((UNIT FMALL) (FR500-MAJOR F-6) (FR550-MAJOR F-4) (MACH simple,tomcat,fr500,fr550,frv)) 7460 1.1 christos "fdcmps$pack $FRi,$FRj,$FCCi_2" 7461 1.1 christos (+ pack (cond-null) FCCi_2 OP_79 FRi OPE1_1A FRj) 7462 1.1 christos (sequence () 7463 1.1 christos (compare-and-set-fcc FRi FRj FCCi_2) 7464 1.1 christos (compare-and-set-fcc (nextreg h-fr FRi 1) (nextreg h-fr FRj 1) 7465 1.1 christos (nextreg h-fccr FCCi_2 1))) 7466 1.1 christos ((fr500 (unit u-float-dual-compare)) (fr550 (unit u-float-dual-compare))) 7467 1.1 christos ) 7468 1.1 christos 7469 1.1 christos (define-pmacro (float-mul-with-add name add_sub arg1 arg2 targ op ope comment) 7470 1.1 christos (dni name 7471 1.1 christos (comment) 7472 1.1 christos ((UNIT FMALL) (FR500-MAJOR F-5) (MACH frv)) 7473 1.1 christos (.str name "$pack $" arg1 ",$" arg2 ",$" targ) 7474 1.1 christos (+ pack targ op arg1 ope arg2) 7475 1.1 christos (set targ (add_sub (mul arg1 arg2) targ)) 7476 1.1 christos ((fr500 (unit u-float-dual-arith))) 7477 1.1 christos ) 7478 1.1 christos ) 7479 1.1 christos 7480 1.1 christos (float-mul-with-add fmadds add FRi FRj FRk OP_79 OPE1_0B "mul with add, single") 7481 1.1 christos (float-mul-with-add fmsubs sub FRi FRj FRk OP_79 OPE1_0C "mul with sub, single") 7482 1.1 christos 7483 1.1 christos (float-mul-with-add fmaddd add FRdoublei FRdoublej FRdoublek OP_7A OPE1_0B "mul with add, double") 7484 1.1 christos (float-mul-with-add fmsubd sub FRdoublei FRdoublej FRdoublek OP_7A OPE1_0C "mul with sub, double") 7485 1.1 christos 7486 1.1 christos (dni fdmadds 7487 1.1 christos "Float dual multiply with add" 7488 1.1 christos ((UNIT FMALL) (FR500-MAJOR F-5) (MACH frv)) 7489 1.1 christos "fdmadds$pack $FRi,$FRj,$FRk" 7490 1.1 christos (+ pack FRk OP_79 FRi OPE1_1B FRj) 7491 1.1 christos (sequence () 7492 1.1 christos (set FRk (add (mul FRi FRj) FRk)) 7493 1.1 christos (set (nextreg h-fr FRk 1) 7494 1.1 christos (add (mul (nextreg h-fr FRi 1) (nextreg h-fr FRj 1)) 7495 1.1 christos (nextreg h-fr FRk 1)))) 7496 1.1 christos ; TODO dual registers not referenced for profiling 7497 1.1 christos ((fr500 (unit u-float-dual-arith))) 7498 1.1 christos ) 7499 1.1 christos 7500 1.1 christos (dni nfdmadds 7501 1.1 christos "Non excepting float dual multiply with add" 7502 1.1 christos ((UNIT FMALL) (FR500-MAJOR F-5) (MACH frv)) 7503 1.1 christos "nfdmadds$pack $FRi,$FRj,$FRk" 7504 1.1 christos (+ pack FRk OP_79 FRi OPE1_3B FRj) 7505 1.1 christos (sequence () 7506 1.1 christos (c-call VOID "@cpu@_set_ne_index" (index-of FRk)) 7507 1.1 christos (set FRk (add (mul FRi FRj) FRk)) 7508 1.1 christos (c-call VOID "@cpu@_set_ne_index" (add (index-of FRk) 1)) 7509 1.1 christos (set (nextreg h-fr FRk 1) 7510 1.1 christos (add (mul (nextreg h-fr FRi 1) (nextreg h-fr FRj 1)) 7511 1.1 christos (nextreg h-fr FRk 1)))) 7512 1.1 christos ; TODO dual registers not referenced for profiling 7513 1.1 christos ((fr500 (unit u-float-dual-arith))) 7514 1.1 christos ) 7515 1.1 christos 7516 1.1 christos (define-pmacro (conditional-float-mul-with-add 7517 1.1 christos name add_sub arg1 arg2 targ op ope comment) 7518 1.1 christos (dni name 7519 1.1 christos (comment) 7520 1.1 christos ((UNIT FMALL) (FR500-MAJOR F-5) (MACH frv) CONDITIONAL) 7521 1.1 christos (.str name "$pack $FRi,$FRj,$FRk,$CCi,$cond") 7522 1.1 christos (+ pack FRk op FRi CCi cond ope FRj) 7523 1.1 christos (if (eq CCi (or cond 2)) 7524 1.1 christos (set targ (add_sub (mul arg1 arg2) targ))) 7525 1.1 christos ((fr500 (unit u-float-dual-arith))) 7526 1.1 christos ) 7527 1.1 christos ) 7528 1.1 christos 7529 1.1 christos (conditional-float-mul-with-add cfmadds add FRi FRj FRk OP_6F OPE4_0 "conditional mul with add, single") 7530 1.1 christos (conditional-float-mul-with-add cfmsubs sub FRi FRj FRk OP_6F OPE4_1 "conditional mul with sub, single") 7531 1.1 christos 7532 1.1 christos (define-pmacro (ne-float-mul-with-add name add_sub arg1 arg2 targ op ope comment) 7533 1.1 christos (dni name 7534 1.1 christos (comment) 7535 1.1 christos ((UNIT FMALL) (FR500-MAJOR F-5) (MACH frv) NON-EXCEPTING) 7536 1.1 christos (.str name "$pack $" arg1 ",$" arg2 ",$" targ) 7537 1.1 christos (+ pack targ op arg1 ope arg2) 7538 1.1 christos (sequence () 7539 1.1 christos (c-call VOID "@cpu@_set_ne_index" (index-of targ)) 7540 1.1 christos (set targ (add_sub (mul arg1 arg2) targ))) 7541 1.1 christos ((fr500 (unit u-float-dual-arith))) 7542 1.1 christos ) 7543 1.1 christos ) 7544 1.1 christos 7545 1.1 christos (ne-float-mul-with-add nfmadds add FRi FRj FRk OP_79 OPE1_2B "non excepting mul with add, single") 7546 1.1 christos (ne-float-mul-with-add nfmsubs sub FRi FRj FRk OP_79 OPE1_2C "non excepting mul with sub, single") 7547 1.1 christos 7548 1.1 christos (define-pmacro (float-parallel-mul-add-semantics cond add_sub arg1 arg2 targ) 7549 1.1 christos (if cond 7550 1.1 christos (sequence () 7551 1.1 christos (set targ (mul arg1 arg2)) 7552 1.1 christos (set (nextreg h-fr targ 1) 7553 1.1 christos (add_sub (nextreg h-fr arg1 1) (nextreg h-fr arg2 1))))) 7554 1.1 christos ) 7555 1.1 christos 7556 1.1 christos (define-pmacro (float-parallel-mul-add 7557 1.1 christos name add_sub arg1 arg2 targ op ope comment) 7558 1.1 christos (dni name 7559 1.1 christos (comment) 7560 1.1 christos ((UNIT FM01) (FR500-MAJOR F-5) (FR550-MAJOR F-4) (MACH simple,tomcat,fr500,fr550,frv)) 7561 1.1 christos (.str name "$pack $" arg1 ",$" arg2 ",$" targ) 7562 1.1 christos (+ pack targ op arg1 ope arg2) 7563 1.1 christos (float-parallel-mul-add-semantics 1 add_sub arg1 arg2 targ) 7564 1.1 christos ((fr500 (unit u-float-dual-arith)) (fr550 (unit u-float-dual-arith))) 7565 1.1 christos ) 7566 1.1 christos ) 7567 1.1 christos 7568 1.1 christos (float-parallel-mul-add fmas add FRi FRj FRk OP_79 OPE1_0E "parallel mul/add, single") 7569 1.1 christos (float-parallel-mul-add fmss sub FRi FRj FRk OP_79 OPE1_0F "parallel mul/sub, single") 7570 1.1 christos 7571 1.1 christos (define-pmacro (float-dual-parallel-mul-add-semantics add_sub arg1 arg2 targ) 7572 1.1 christos (sequence () 7573 1.1 christos (set targ (mul arg1 arg2)) 7574 1.1 christos (set (nextreg h-fr targ 1) 7575 1.1 christos (add_sub (nextreg h-fr arg1 1) (nextreg h-fr arg2 1))) 7576 1.1 christos (set (nextreg h-fr targ 2) 7577 1.1 christos (mul (nextreg h-fr arg1 2) (nextreg h-fr arg2 2))) 7578 1.1 christos (set (nextreg h-fr targ 3) 7579 1.1 christos (add_sub (nextreg h-fr arg1 3) (nextreg h-fr arg2 3)))) 7580 1.1 christos ) 7581 1.1 christos 7582 1.1 christos (define-pmacro (float-dual-parallel-mul-add 7583 1.1 christos name add_sub arg1 arg2 targ op ope comment) 7584 1.1 christos (dni name 7585 1.1 christos (comment) 7586 1.1 christos ((UNIT FM01) (FR500-MAJOR F-5) (MACH frv)) 7587 1.1 christos (.str name "$pack $" arg1 ",$" arg2 ",$" targ) 7588 1.1 christos (+ pack targ op arg1 ope arg2) 7589 1.1 christos (float-dual-parallel-mul-add-semantics add_sub arg1 arg2 targ) 7590 1.1 christos () 7591 1.1 christos ) 7592 1.1 christos ) 7593 1.1 christos 7594 1.1 christos (float-dual-parallel-mul-add fdmas add FRi FRj FRk OP_79 OPE1_1C "dual parallel mul/add, single") 7595 1.1 christos (float-dual-parallel-mul-add fdmss sub FRi FRj FRk OP_79 OPE1_1D "dual parallel mul/sub, single") 7596 1.1 christos 7597 1.1 christos (define-pmacro (ne-float-dual-parallel-mul-add-semantics add_sub arg1 arg2 targ) 7598 1.1 christos (sequence () 7599 1.1 christos (c-call VOID "@cpu@_set_ne_index" (index-of targ)) 7600 1.1 christos (c-call VOID "@cpu@_set_ne_index" (add (index-of targ) 1)) 7601 1.1 christos (c-call VOID "@cpu@_set_ne_index" (add (index-of targ) 2)) 7602 1.1 christos (c-call VOID "@cpu@_set_ne_index" (add (index-of targ) 3)) 7603 1.1 christos (set targ (mul arg1 arg2)) 7604 1.1 christos (set (nextreg h-fr targ 1) 7605 1.1 christos (add_sub (nextreg h-fr arg1 1) (nextreg h-fr arg2 1))) 7606 1.1 christos (set (nextreg h-fr targ 2) 7607 1.1 christos (mul (nextreg h-fr arg1 2) (nextreg h-fr arg2 2))) 7608 1.1 christos (set (nextreg h-fr targ 3) 7609 1.1 christos (add_sub (nextreg h-fr arg1 3) (nextreg h-fr arg2 3)))) 7610 1.1 christos ) 7611 1.1 christos 7612 1.1 christos (define-pmacro (ne-float-dual-parallel-mul-add 7613 1.1 christos name add_sub arg1 arg2 targ op ope comment) 7614 1.1 christos (dni name 7615 1.1 christos (comment) 7616 1.1 christos ((UNIT FM01) (FR500-MAJOR F-5) (MACH frv)) 7617 1.1 christos (.str name "$pack $" arg1 ",$" arg2 ",$" targ) 7618 1.1 christos (+ pack targ op arg1 ope arg2) 7619 1.1 christos (ne-float-dual-parallel-mul-add-semantics add_sub arg1 arg2 targ) 7620 1.1 christos () 7621 1.1 christos ) 7622 1.1 christos ) 7623 1.1 christos 7624 1.1 christos (ne-float-dual-parallel-mul-add nfdmas add FRi FRj FRk OP_79 OPE1_3C "non excepting dual parallel mul/add, single") 7625 1.1 christos (ne-float-dual-parallel-mul-add nfdmss sub FRi FRj FRk OP_79 OPE1_3D "non excepting dual parallel mul/sub, single") 7626 1.1 christos 7627 1.1 christos (define-pmacro (conditional-float-parallel-mul-add name add_sub op ope comment) 7628 1.1 christos (dni name 7629 1.1 christos (comment) 7630 1.1 christos ((UNIT FM01) (FR500-MAJOR F-5) (FR550-MAJOR F-4) CONDITIONAL (MACH simple,tomcat,fr500,fr550,frv)) 7631 1.1 christos (.str name "$pack $FRi,$FRj,$FRk,$CCi,$cond") 7632 1.1 christos (+ pack FRk op FRi CCi cond ope FRj) 7633 1.1 christos (float-parallel-mul-add-semantics (eq CCi (or cond 2)) 7634 1.1 christos add_sub FRi FRj FRk) 7635 1.1 christos ((fr500 (unit u-float-dual-arith)) (fr550 (unit u-float-dual-arith))) 7636 1.1 christos ) 7637 1.1 christos ) 7638 1.1 christos 7639 1.1 christos (conditional-float-parallel-mul-add cfmas add OP_6F OPE4_2 "conditional parallel mul/add, single") 7640 1.1 christos (conditional-float-parallel-mul-add cfmss sub OP_6F OPE4_3 "conditional parallel mul/sub, single") 7641 1.1 christos 7642 1.1 christos (define-pmacro (float-parallel-mul-add-double-semantics add_sub arg1 arg2 targ) 7643 1.1 christos (sequence () 7644 1.1 christos (set targ (ftrunc SF FPCONV-DEFAULT 7645 1.1 christos (mul DF 7646 1.1 christos (fext DF FPCONV-DEFAULT arg1) 7647 1.1 christos (fext DF FPCONV-DEFAULT arg2)))) 7648 1.1 christos (set (nextreg h-fr targ 1) 7649 1.1 christos (ftrunc SF FPCONV-DEFAULT 7650 1.1 christos (add_sub DF 7651 1.1 christos (fext DF FPCONV-DEFAULT (nextreg h-fr arg1 1)) 7652 1.1 christos (fext DF FPCONV-DEFAULT (nextreg h-fr arg2 1)))))) 7653 1.1 christos ) 7654 1.1 christos 7655 1.1 christos (define-pmacro (float-parallel-mul-add-double 7656 1.1 christos name add_sub arg1 arg2 targ op ope comment) 7657 1.1 christos (dni name 7658 1.1 christos (comment) 7659 1.1 christos ((UNIT FM01) (FR500-MAJOR F-5) (MACH frv)) 7660 1.1 christos (.str name "$pack $" arg1 ",$" arg2 ",$" targ) 7661 1.1 christos (+ pack targ op arg1 ope arg2) 7662 1.1 christos (float-parallel-mul-add-double-semantics add_sub arg1 arg2 targ) 7663 1.1 christos () 7664 1.1 christos ) 7665 1.1 christos ) 7666 1.1 christos 7667 1.1 christos (float-parallel-mul-add-double fmad add FRi FRj FRk OP_7A OPE1_0E "parallel mul/add, double") 7668 1.1 christos (float-parallel-mul-add-double fmsd sub FRi FRj FRk OP_7A OPE1_0F "parallel mul/sub, double") 7669 1.1 christos 7670 1.1 christos (define-pmacro (ne-float-parallel-mul-add name add_sub op ope comment) 7671 1.1 christos (dni name 7672 1.1 christos (comment) 7673 1.1 christos ((UNIT FM01) (FR500-MAJOR F-5) (FR550-MAJOR F-4) (MACH simple,tomcat,fr500,fr550,frv)) 7674 1.1 christos (.str name "$pack $FRi,$FRj,$FRk") 7675 1.1 christos (+ pack FRk op FRi ope FRj) 7676 1.1 christos (sequence () 7677 1.1 christos (c-call VOID "@cpu@_set_ne_index" (index-of FRk)) 7678 1.1 christos (set FRk (mul FRi FRj)) 7679 1.1 christos (c-call VOID "@cpu@_set_ne_index" (add (index-of FRk) 1)) 7680 1.1 christos (set (nextreg h-fr FRk 1) 7681 1.1 christos (add_sub (nextreg h-fr FRi 1) (nextreg h-fr FRj 1)))) 7682 1.1 christos ((fr500 (unit u-float-dual-arith)) (fr550 (unit u-float-dual-arith))) 7683 1.1 christos ) 7684 1.1 christos ) 7685 1.1 christos 7686 1.1 christos (ne-float-parallel-mul-add nfmas add OP_79 OPE1_2E "ne parallel mul/add,single") 7687 1.1 christos (ne-float-parallel-mul-add nfmss sub OP_79 OPE1_2F "ne parallel mul/sub,single") 7688 1.1 christos 7689 1.1 christos (define-pmacro (float-dual-arith name attr oper1 oper2 op ope comment) 7690 1.1 christos (dni name 7691 1.1 christos (comment) 7692 1.1 christos (.splice (UNIT FM01) (.unsplice attr)) 7693 1.1 christos (.str name "$pack $FRi,$FRj,$FRk") 7694 1.1 christos (+ pack FRk op FRi ope FRj) 7695 1.1 christos (sequence () 7696 1.1 christos (set FRk (oper1 FRi FRj)) 7697 1.1 christos (set (nextreg h-fr FRk 1) 7698 1.1 christos (oper2 (nextreg h-fr FRi 1) (nextreg h-fr FRj 1)))) 7699 1.1 christos ((fr500 (unit u-float-dual-arith)) (fr550 (unit u-float-dual-arith))) 7700 1.1 christos ) 7701 1.1 christos ) 7702 1.1 christos 7703 1.1 christos (float-dual-arith fdadds ((FR500-MAJOR F-6) (FR550-MAJOR F-4) (MACH simple,tomcat,fr500,fr550,frv)) add add OP_79 OPE1_16 "dual add, single") 7704 1.1 christos (float-dual-arith fdsubs ((FR500-MAJOR F-6) (FR550-MAJOR F-4) (MACH simple,tomcat,fr500,fr550,frv)) sub sub OP_79 OPE1_17 "dual sub, single") 7705 1.1 christos (float-dual-arith fdmuls ((FR500-MAJOR F-7) (FR550-MAJOR F-4) (MACH simple,tomcat,fr500,fr550,frv)) mul mul OP_79 OPE1_18 "dual mul, single") 7706 1.1 christos (float-dual-arith fddivs ((FR500-MAJOR F-7) (MACH frv)) div div OP_79 OPE1_19 "dual div,single") 7707 1.1 christos (float-dual-arith fdsads ((FR500-MAJOR F-6) (FR550-MAJOR F-4) (MACH simple,tomcat,fr500,fr550,frv)) add sub OP_79 OPE1_1E "dual add/sub, single") 7708 1.1 christos 7709 1.1 christos (dni fdmulcs 7710 1.1 christos "Float dual cross multiply single" 7711 1.1 christos ((UNIT FM01) (FR500-MAJOR F-7) (FR550-MAJOR F-4) (MACH simple,tomcat,fr500,fr550,frv)) 7712 1.1 christos "fdmulcs$pack $FRi,$FRj,$FRk" 7713 1.1 christos (+ pack FRk OP_79 FRi OPE1_1F FRj) 7714 1.1 christos (sequence () 7715 1.1 christos (set FRk (mul FRi (nextreg h-fr FRj 1))) 7716 1.1 christos (set (nextreg h-fr FRk 1) (mul (nextreg h-fr FRi 1) FRj))) 7717 1.1 christos ((fr500 (unit u-float-dual-arith)) (fr550 (unit u-float-dual-arith))) 7718 1.1 christos ) 7719 1.1 christos 7720 1.1 christos (dni nfdmulcs 7721 1.1 christos "NE float dual cross multiply single" 7722 1.1 christos ((UNIT FM01) (FR500-MAJOR F-7) (FR550-MAJOR F-4) (MACH simple,tomcat,fr500,fr550,frv)) 7723 1.1 christos "nfdmulcs$pack $FRi,$FRj,$FRk" 7724 1.1 christos (+ pack FRk OP_79 FRi OPE1_3F FRj) 7725 1.1 christos (sequence () 7726 1.1 christos (c-call VOID "@cpu@_set_ne_index" (index-of FRk)) 7727 1.1 christos (set FRk (mul FRi (nextreg h-fr FRj 1))) 7728 1.1 christos (c-call VOID "@cpu@_set_ne_index" (add (index-of FRk) 1)) 7729 1.1 christos (set (nextreg h-fr FRk 1) (mul (nextreg h-fr FRi 1) FRj))) 7730 1.1 christos ((fr500 (unit u-float-dual-arith)) (fr550 (unit u-float-dual-arith))) 7731 1.1 christos ) 7732 1.1 christos 7733 1.1 christos (define-pmacro (ne-float-dual-arith name attr oper1 oper2 op ope comment) 7734 1.1 christos (dni name 7735 1.1 christos (comment) 7736 1.1 christos (.splice (UNIT FM01) (.unsplice attr)) 7737 1.1 christos (.str name "$pack $FRi,$FRj,$FRk") 7738 1.1 christos (+ pack FRk op FRi ope FRj) 7739 1.1 christos (sequence () 7740 1.1 christos (c-call VOID "@cpu@_set_ne_index" (index-of FRk)) 7741 1.1 christos (set FRk (oper1 FRi FRj)) 7742 1.1 christos (c-call VOID "@cpu@_set_ne_index" (add (index-of FRk) 1)) 7743 1.1 christos (set (nextreg h-fr FRk 1) 7744 1.1 christos (oper2 (nextreg h-fr FRi 1) (nextreg h-fr FRj 1)))) 7745 1.1 christos ((fr500 (unit u-float-dual-arith)) (fr550 (unit u-float-dual-arith))) 7746 1.1 christos ) 7747 1.1 christos ) 7748 1.1 christos 7749 1.1 christos (ne-float-dual-arith nfdadds ((FR500-MAJOR F-6) (FR550-MAJOR F-4) (MACH simple,tomcat,fr500,fr550,frv)) add add OP_79 OPE1_36 "ne dual add, single") 7750 1.1 christos (ne-float-dual-arith nfdsubs ((FR500-MAJOR F-6) (FR550-MAJOR F-4) (MACH simple,tomcat,fr500,fr550,frv)) sub sub OP_79 OPE1_37 "ne dual sub, single") 7751 1.1 christos (ne-float-dual-arith nfdmuls ((FR500-MAJOR F-7) (FR550-MAJOR F-4) (MACH simple,tomcat,fr500,fr550,frv)) mul mul OP_79 OPE1_38 "ne dual mul, single") 7752 1.1 christos (ne-float-dual-arith nfddivs ((FR500-MAJOR F-7) (MACH frv)) div div OP_79 OPE1_39 "ne dual div,single") 7753 1.1 christos (ne-float-dual-arith nfdsads ((FR500-MAJOR F-6) (FR550-MAJOR F-4) (MACH simple,tomcat,fr500,fr550,frv)) add sub OP_79 OPE1_3E "ne dual add/sub, single") 7754 1.1 christos 7755 1.1 christos (dni nfdcmps 7756 1.1 christos "non-excepting dual float compare" 7757 1.1 christos ((UNIT FM01) (FR500-MAJOR F-6) (MACH simple,tomcat,frv)) 7758 1.1 christos "nfdcmps$pack $FRi,$FRj,$FCCi_2" 7759 1.1 christos (+ pack (cond-null) FCCi_2 OP_79 FRi OPE1_3A FRj) 7760 1.1 christos (sequence () 7761 1.1 christos (c-call VOID "@cpu@_set_ne_index" (index-of FRk)) 7762 1.1 christos (compare-and-set-fcc FRi FRj FCCi_2) 7763 1.1 christos (c-call VOID "@cpu@_set_ne_index" (add (index-of FRk) 1)) 7764 1.1 christos (compare-and-set-fcc (nextreg h-fr FRi 1) (nextreg h-fr FRj 1) 7765 1.1 christos (nextreg h-fccr FCCi_2 1))) 7766 1.1 christos ((fr500 (unit u-float-dual-compare))) 7767 1.1 christos ) 7768 1.1 christos 7769 1.1 christos ; Media Instructions 7770 1.1 christos ; 7771 1.1 christos (define-pmacro (halfword hilo arg offset) 7772 1.1 christos (reg (.sym h-fr_ hilo) (add (index-of arg) offset))) 7773 1.1 christos 7774 1.1 christos (dni mhsetlos 7775 1.1 christos "Media set lower signed 12 bits" 7776 1.1 christos ((UNIT FMALL) (MACH fr400,fr450,fr550) (FR550-MAJOR M-5) 7777 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-1)) 7778 1.1 christos "mhsetlos$pack $u12,$FRklo" 7779 1.1 christos (+ pack FRklo OP_78 OPE1_20 u12) 7780 1.1 christos (set FRklo u12) 7781 1.1 christos ((fr400 (unit u-media-hilo)) (fr450 (unit u-media-hilo)) 7782 1.1 christos (fr550 (unit u-media-set (out FRintk FRklo)))) 7783 1.1 christos ) 7784 1.1 christos 7785 1.1 christos (dni mhsethis 7786 1.1 christos "Media set upper signed 12 bits" 7787 1.1 christos ((UNIT FMALL) (MACH fr400,fr450,fr550) (FR550-MAJOR M-5) 7788 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-1)) 7789 1.1 christos "mhsethis$pack $u12,$FRkhi" 7790 1.1 christos (+ pack FRkhi OP_78 OPE1_22 u12) 7791 1.1 christos (set FRkhi u12) 7792 1.1 christos ((fr400 (unit u-media-hilo)) (fr450 (unit u-media-hilo)) 7793 1.1 christos (fr550 (unit u-media-set (out FRintk FRkhi)))) 7794 1.1 christos ) 7795 1.1 christos 7796 1.1 christos (dni mhdsets 7797 1.1 christos "Media dual set halfword signed 12 bits" 7798 1.1 christos ((UNIT FMALL) (MACH fr400,fr450,fr550) (FR550-MAJOR M-5) 7799 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-1)) 7800 1.1 christos "mhdsets$pack $u12,$FRintk" 7801 1.1 christos (+ pack FRintk OP_78 OPE1_24 u12) 7802 1.1 christos (sequence () 7803 1.1 christos ; hack to get FRintk passed to modelling functions 7804 1.1 christos (set FRintk (c-raw-call SI "frv_ref_SI" FRintk)) 7805 1.1 christos (set (halfword hi FRintk 0) u12) 7806 1.1 christos (set (halfword lo FRintk 0) u12)) 7807 1.1 christos ((fr400 (unit u-media-1)) (fr450 (unit u-media-1)) 7808 1.1 christos (fr550 (unit u-media-set))) 7809 1.1 christos ) 7810 1.1 christos 7811 1.1 christos (define-pmacro (set-5-semantics target value) 7812 1.1 christos (sequence ((HI tmp)) 7813 1.1 christos (set tmp target) 7814 1.1 christos (set tmp (and tmp #x07ff)) 7815 1.1 christos (set tmp (or tmp (sll (and s5 #x1f) 11))) 7816 1.1 christos (set target tmp)) 7817 1.1 christos ) 7818 1.1 christos 7819 1.1 christos (define-pmacro (media-set-5 name hilo op ope comment) 7820 1.1 christos (dni name 7821 1.1 christos (comment) 7822 1.1 christos ((UNIT FMALL) (MACH fr400,fr450,fr550) (FR550-MAJOR M-5) 7823 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-1)) 7824 1.1 christos (.str name "$pack $s5,$FRk" hilo) 7825 1.1 christos (+ pack (.sym FRk hilo) op (FRi-null) ope (misc-null-11) s5) 7826 1.1 christos (set-5-semantics (.sym FRk hilo) s5) 7827 1.1 christos ((fr400 (unit u-media-hilo)) (fr450 (unit u-media-hilo)) 7828 1.1 christos (fr550 (unit u-media-set (out FRintk (.sym FRk hilo))))) 7829 1.1 christos ) 7830 1.1 christos ) 7831 1.1 christos 7832 1.1 christos (media-set-5 mhsetloh lo OP_78 OPE1_21 "Media set upper 5 bits lo") 7833 1.1 christos (media-set-5 mhsethih hi OP_78 OPE1_23 "Media set upper 5 bits hi") 7834 1.1 christos 7835 1.1 christos (dni mhdseth 7836 1.1 christos "Media dual set halfword upper 5 bits" 7837 1.1 christos ((UNIT FMALL) (MACH fr400,fr450,fr550) (FR550-MAJOR M-5) 7838 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-1)) 7839 1.1 christos "mhdseth$pack $s5,$FRintk" 7840 1.1 christos (+ pack FRintk OP_78 (FRi-null) OPE1_25 (misc-null-11) s5) 7841 1.1 christos (sequence () 7842 1.1 christos ; hack to get FRintk passed to modelling functions 7843 1.1 christos (set FRintk (c-raw-call SI "frv_ref_SI" FRintk)) 7844 1.1 christos (set-5-semantics (halfword hi FRintk 0) s5) 7845 1.1 christos (set-5-semantics (halfword lo FRintk 0) s5)) 7846 1.1 christos ((fr400 (unit u-media-1)) (fr450 (unit u-media-1)) 7847 1.1 christos (fr550 (unit u-media-set))) 7848 1.1 christos ) 7849 1.1 christos 7850 1.1 christos (define-pmacro (media-logic-r-r name operation op ope comment) 7851 1.1 christos (dni name 7852 1.1 christos (comment) 7853 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-1) (FR550-MAJOR M-2) 7854 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-1)) 7855 1.1 christos (.str name "$pack $FRinti,$FRintj,$FRintk") 7856 1.1 christos (+ pack FRintk op FRinti ope FRintj) 7857 1.1 christos (set FRintk (operation FRinti FRintj)) 7858 1.1 christos ((fr400 (unit u-media-1)) (fr450 (unit u-media-1)) 7859 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media))) 7860 1.1 christos ) 7861 1.1 christos ) 7862 1.1 christos 7863 1.1 christos (media-logic-r-r mand and OP_7B OPE1_00 "and reg/reg") 7864 1.1 christos (media-logic-r-r mor or OP_7B OPE1_01 "or reg/reg") 7865 1.1 christos (media-logic-r-r mxor xor OP_7B OPE1_02 "xor reg/reg") 7866 1.1 christos 7867 1.1 christos (define-pmacro (conditional-media-logic name operation op ope comment) 7868 1.1 christos (dni name 7869 1.1 christos (comment) 7870 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-1) (FR550-MAJOR M-2) 7871 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-1) CONDITIONAL) 7872 1.1 christos (.str name "$pack $FRinti,$FRintj,$FRintk,$CCi,$cond") 7873 1.1 christos (+ pack FRintk op FRinti CCi cond ope FRintj) 7874 1.1 christos (if (eq CCi (or cond 2)) 7875 1.1 christos (set FRintk (operation FRinti FRintj))) 7876 1.1 christos ((fr400 (unit u-media-1)) (fr450 (unit u-media-1)) 7877 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media))) 7878 1.1 christos ) 7879 1.1 christos ) 7880 1.1 christos 7881 1.1 christos (conditional-media-logic cmand and OP_70 OPE4_0 "conditional and reg/reg") 7882 1.1 christos (conditional-media-logic cmor or OP_70 OPE4_1 "conditional or reg/reg") 7883 1.1 christos (conditional-media-logic cmxor xor OP_70 OPE4_2 "conditional xor reg/reg") 7884 1.1 christos 7885 1.1 christos (dni mnot 7886 1.1 christos ("mnot") 7887 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-1) (FR550-MAJOR M-2) 7888 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-1)) 7889 1.1 christos ("mnot$pack $FRintj,$FRintk") 7890 1.1 christos (+ pack FRintk OP_7B (rs-null) OPE1_03 FRintj) 7891 1.1 christos (set FRintk (inv FRintj)) 7892 1.1 christos ((fr400 (unit u-media-1)) (fr450 (unit u-media-1)) 7893 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media))) 7894 1.1 christos ) 7895 1.1 christos 7896 1.1 christos (dni cmnot 7897 1.1 christos ("cmnot") 7898 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-1) (FR550-MAJOR M-2) 7899 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-1) CONDITIONAL) 7900 1.1 christos ("cmnot$pack $FRintj,$FRintk,$CCi,$cond") 7901 1.1 christos (+ pack FRintk OP_70 (rs-null) CCi cond OPE4_3 FRintj) 7902 1.1 christos (if (eq CCi (or cond 2)) 7903 1.1 christos (set FRintk (inv FRintj))) 7904 1.1 christos ((fr400 (unit u-media-1)) (fr450 (unit u-media-1)) 7905 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media))) 7906 1.1 christos ) 7907 1.1 christos 7908 1.1 christos (define-pmacro (media-rotate-r-r name operation op ope comment) 7909 1.1 christos (dni name 7910 1.1 christos (comment) 7911 1.1 christos ((UNIT FM01) (FR500-MAJOR M-2) (FR550-MAJOR M-3) 7912 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-1)) 7913 1.1 christos (.str name "$pack $FRinti,$u6,$FRintk") 7914 1.1 christos (+ pack FRintk op FRinti ope u6) 7915 1.1 christos (set FRintk (operation FRinti (and u6 #x1f))) 7916 1.1 christos ((fr400 (unit u-media-3)) (fr450 (unit u-media-3)) 7917 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media))) 7918 1.1 christos ) 7919 1.1 christos ) 7920 1.1 christos 7921 1.1 christos (media-rotate-r-r mrotli rol OP_7B OPE1_04 "rotate left reg/reg") 7922 1.1 christos (media-rotate-r-r mrotri ror OP_7B OPE1_05 "rotate right reg/reg") 7923 1.1 christos 7924 1.1 christos (define-pmacro (media-cut-r-r name arg op ope comment) 7925 1.1 christos (dni name 7926 1.1 christos (comment) 7927 1.1 christos ((UNIT FM01) (FR500-MAJOR M-2) (FR550-MAJOR M-3) 7928 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-2)) 7929 1.1 christos (.str name "$pack $FRinti,$" arg ",$FRintk") 7930 1.1 christos (+ pack FRintk op FRinti ope arg) 7931 1.1 christos (set FRintk (c-call SI "@cpu@_cut" FRinti (nextreg h-fr_int FRinti 1) arg)) 7932 1.1 christos ((fr400 (unit u-media-3)) (fr450 (unit u-media-3)) 7933 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media))) 7934 1.1 christos ) 7935 1.1 christos ) 7936 1.1 christos 7937 1.1 christos (media-cut-r-r mwcut FRintj OP_7B OPE1_06 "media cut") 7938 1.1 christos (media-cut-r-r mwcuti u6 OP_7B OPE1_07 "media cut") 7939 1.1 christos 7940 1.1 christos (define-pmacro (media-cut-acc name arg op ope fr450-major comment) 7941 1.1 christos (dni name 7942 1.1 christos (comment) 7943 1.1 christos ((UNIT FM01) (FR500-MAJOR M-2) (FR550-MAJOR M-3) 7944 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR fr450-major)) 7945 1.1 christos (.str name "$pack $ACC40Si,$" arg ",$FRintk") 7946 1.1 christos (+ pack FRintk op ACC40Si ope arg) 7947 1.1 christos (set FRintk (c-call SI "@cpu@_media_cut" ACC40Si arg)) 7948 1.1 christos ((fr400 (unit u-media-4)) (fr450 (unit u-media-4)) 7949 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media-3-acc))) 7950 1.1 christos ) 7951 1.1 christos ) 7952 1.1 christos 7953 1.1 christos (media-cut-acc mcut FRintj OP_7B OPE1_2C M-1 "media accumulator cut reg") 7954 1.1 christos (media-cut-acc mcuti s6 OP_7B OPE1_2E M-5 "media accumulator cut immed") 7955 1.1 christos 7956 1.1 christos (define-pmacro (media-cut-acc-ss name arg op ope fr450-major comment) 7957 1.1 christos (dni name 7958 1.1 christos (comment) 7959 1.1 christos ((UNIT FM01) (FR500-MAJOR M-2) (FR550-MAJOR M-3) 7960 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR fr450-major)) 7961 1.1 christos (.str name "$pack $ACC40Si,$" arg ",$FRintk") 7962 1.1 christos (+ pack FRintk op ACC40Si ope arg) 7963 1.1 christos (set FRintk (c-call SI "@cpu@_media_cut_ss" ACC40Si arg)) 7964 1.1 christos ((fr400 (unit u-media-4)) (fr450 (unit u-media-4)) 7965 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media-3-acc))) 7966 1.1 christos ) 7967 1.1 christos ) 7968 1.1 christos 7969 1.1 christos (media-cut-acc-ss mcutss FRintj OP_7B OPE1_2D M-1 "media accumulator cut reg with saturation") 7970 1.1 christos (media-cut-acc-ss mcutssi s6 OP_7B OPE1_2F M-5 "media accumulator cut immed with saturation") 7971 1.1 christos 7972 1.1 christos ; Dual Media Instructions 7973 1.1 christos ; 7974 1.1 christos (define-pmacro (register-unaligned register alignment) 7975 1.1 christos (and (index-of register) (sub alignment 1)) 7976 1.1 christos ) 7977 1.1 christos 7978 1.1 christos (dni mdcutssi 7979 1.1 christos "Media dual cut with signed saturation" 7980 1.1 christos ((UNIT MDCUTSSI) (MACH fr400,fr450,fr550) (FR550-MAJOR M-3) 7981 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-6)) 7982 1.1 christos "mdcutssi$pack $ACC40Si,$s6,$FRintkeven" 7983 1.1 christos (+ pack FRintkeven OP_78 ACC40Si OPE1_0E s6) 7984 1.1 christos (if (register-unaligned ACC40Si 2) 7985 1.1 christos (c-call VOID "@cpu@_media_acc_not_aligned") 7986 1.1 christos (if (register-unaligned FRintkeven 2) 7987 1.1 christos (c-call VOID "@cpu@_media_register_not_aligned") 7988 1.1 christos (sequence () 7989 1.1 christos (set FRintkeven (c-call SI "@cpu@_media_cut_ss" ACC40Si s6)) 7990 1.1 christos (set (nextreg h-fr_int FRintkeven 1) 7991 1.1 christos (c-call SI "@cpu@_media_cut_ss" 7992 1.1 christos (nextreg h-acc40S ACC40Si 1) s6))))) 7993 1.1 christos ((fr400 (unit u-media-4-acc-dual 7994 1.1 christos (out FRintk FRintkeven))) 7995 1.1 christos (fr450 (unit u-media-4-acc-dual 7996 1.1 christos (out FRintk FRintkeven))) 7997 1.1 christos (fr550 (unit u-media-3-acc-dual))) 7998 1.1 christos ) 7999 1.1 christos 8000 1.1 christos ; The (add (xxxx) (mul arg 0)) is a hack to get a reference to arg generated 8001 1.1 christos ; so it will be passed to the unit modelers. YUCK!!!!! 8002 1.1 christos (define-pmacro (extract-hilo reg1 off1 reg2 off2 arg1hi arg1lo arg2hi arg2lo) 8003 1.1 christos (sequence () 8004 1.1 christos (set arg1hi (add (halfword hi reg1 off1) (mul reg1 0))) 8005 1.1 christos (set arg1lo (add (halfword lo reg1 off1) (mul reg1 0))) 8006 1.1 christos (set arg2hi (add (halfword hi reg2 off2) (mul reg2 0))) 8007 1.1 christos (set arg2lo (add (halfword lo reg2 off2) (mul reg2 0)))) 8008 1.1 christos ) 8009 1.1 christos 8010 1.1 christos (dni maveh 8011 1.1 christos "Media dual average" 8012 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-1) (FR550-MAJOR M-2) 8013 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-1)) 8014 1.1 christos "maveh$pack $FRinti,$FRintj,$FRintk" 8015 1.1 christos (+ pack FRintk OP_7B FRinti OPE1_08 FRintj) 8016 1.1 christos (set FRintk (c-call SI "@cpu@_media_average" FRinti FRintj)) 8017 1.1 christos ((fr400 (unit u-media-1)) (fr450 (unit u-media-1)) 8018 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media))) 8019 1.1 christos ) 8020 1.1 christos 8021 1.1 christos (define-pmacro (media-dual-shift name operation op ope profile comment) 8022 1.1 christos (dni name 8023 1.1 christos (comment) 8024 1.1 christos ((UNIT FM01) (FR500-MAJOR M-2) (FR550-MAJOR M-3) 8025 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-1)) 8026 1.1 christos (.str name "$pack $FRinti,$u6,$FRintk") 8027 1.1 christos (+ pack FRintk op FRinti ope u6) 8028 1.1 christos (sequence () 8029 1.1 christos ; hack to get these referenced for profiling 8030 1.1 christos (set FRinti (c-raw-call SI "frv_ref_SI" FRinti)) 8031 1.1 christos (set FRintk (c-raw-call SI "frv_ref_SI" FRintk)) 8032 1.1 christos (set (halfword hi FRintk 0) 8033 1.1 christos (operation (halfword hi FRinti 0) (and u6 #xf))) 8034 1.1 christos (set (halfword lo FRintk 0) 8035 1.1 christos (operation (halfword lo FRinti 0) (and u6 #xf)))) 8036 1.1 christos profile 8037 1.1 christos ) 8038 1.1 christos ) 8039 1.1 christos 8040 1.1 christos (media-dual-shift msllhi sll OP_7B OPE1_09 8041 1.1 christos ((fr400 (unit u-media-3)) (fr450 (unit u-media-3)) 8042 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media))) 8043 1.1 christos "Media dual shift left logical") 8044 1.1 christos (media-dual-shift msrlhi srl OP_7B OPE1_0A 8045 1.1 christos ((fr400 (unit u-media-3)) (fr450 (unit u-media-3)) 8046 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media))) 8047 1.1 christos "Media dual shift right logical") 8048 1.1 christos (media-dual-shift msrahi sra OP_7B OPE1_0B 8049 1.1 christos ((fr400 (unit u-media-6)) (fr450 (unit u-media-6)) 8050 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media))) 8051 1.1 christos "Media dual shift right arithmetic") 8052 1.1 christos 8053 1.1 christos (define-pmacro (media-dual-word-rotate-r-r name operation op ope comment) 8054 1.1 christos (dni name 8055 1.1 christos (comment) 8056 1.1 christos ((UNIT FMLOW) (MACH fr400,fr450,fr550) (FR550-MAJOR M-3) 8057 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-2)) 8058 1.1 christos (.str name "$pack $FRintieven,$s6,$FRintkeven") 8059 1.1 christos (+ pack FRintkeven op FRintieven ope s6) 8060 1.1 christos (if (orif (register-unaligned FRintieven 2) 8061 1.1 christos (register-unaligned FRintkeven 2)) 8062 1.1 christos (c-call VOID "@cpu@_media_register_not_aligned") 8063 1.1 christos (sequence () 8064 1.1 christos (set FRintkeven (operation FRintieven (and s6 #x1f))) 8065 1.1 christos (set (nextreg h-fr_int FRintkeven 1) 8066 1.1 christos (operation (nextreg h-fr_int FRintieven 1) 8067 1.1 christos (and s6 #x1f))))) 8068 1.1 christos ((fr400 (unit u-media-3-quad 8069 1.1 christos (in FRinti FRintieven) 8070 1.1 christos (out FRintk FRintkeven))) 8071 1.1 christos (fr450 (unit u-media-3-quad 8072 1.1 christos (in FRinti FRintieven) 8073 1.1 christos (out FRintk FRintkeven))) 8074 1.1 christos (fr550 (unit u-media-quad))) 8075 1.1 christos ) 8076 1.1 christos ) 8077 1.1 christos 8078 1.1 christos (media-dual-word-rotate-r-r mdrotli rol OP_78 OPE1_0B "rotate left reg/reg") 8079 1.1 christos 8080 1.1 christos (dni mcplhi 8081 1.1 christos "Media bit concatenate, halfword" 8082 1.1 christos ((UNIT FMLOW) (MACH fr400,fr450,fr550) (FR550-MAJOR M-3) 8083 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-2)) 8084 1.1 christos "mcplhi$pack $FRinti,$u6,$FRintk" 8085 1.1 christos (+ pack FRintk OP_78 FRinti OPE1_0C u6) 8086 1.1 christos (sequence ((HI arg1) (HI arg2) (HI shift)) 8087 1.1 christos (set FRinti (c-raw-call SI "frv_ref_SI" FRinti)) 8088 1.1 christos (set FRintk (c-raw-call SI "frv_ref_SI" FRintk)) 8089 1.1 christos (set shift (and u6 #xf)) 8090 1.1 christos (set arg1 (sll (halfword hi FRinti 0) shift)) 8091 1.1 christos (if (ne shift 0) 8092 1.1 christos (sequence () 8093 1.1 christos (set arg2 (halfword hi FRinti 1)) 8094 1.1 christos (set arg2 (srl HI (sll HI arg2 (sub 15 shift)) 8095 1.1 christos (sub 15 shift))) 8096 1.1 christos (set arg1 (or HI arg1 arg2)))) 8097 1.1 christos (set (halfword hi FRintk 0) arg1)) 8098 1.1 christos ((fr400 (unit u-media-3-dual)) (fr450 (unit u-media-3-dual)) 8099 1.1 christos (fr550 (unit u-media-3-dual))) 8100 1.1 christos ) 8101 1.1 christos 8102 1.1 christos (dni mcpli 8103 1.1 christos "Media bit concatenate, word" 8104 1.1 christos ((UNIT FMLOW) (MACH fr400,fr450,fr550) (FR550-MAJOR M-3) 8105 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-2)) 8106 1.1 christos "mcpli$pack $FRinti,$u6,$FRintk" 8107 1.1 christos (+ pack FRintk OP_78 FRinti OPE1_0D u6) 8108 1.1 christos (sequence ((SI tmp) (SI shift)) 8109 1.1 christos (set shift (and u6 #x1f)) 8110 1.1 christos (set tmp (sll FRinti shift)) 8111 1.1 christos (if (ne shift 0) 8112 1.1 christos (sequence ((SI tmp1)) 8113 1.1 christos (set tmp1 (srl (sll (nextreg h-fr_int FRinti 1) 8114 1.1 christos (sub 31 shift)) 8115 1.1 christos (sub 31 shift))) 8116 1.1 christos (set tmp (or tmp tmp1)))) 8117 1.1 christos (set FRintk tmp)) 8118 1.1 christos ((fr400 (unit u-media-3-dual)) (fr450 (unit u-media-3-dual)) 8119 1.1 christos (fr550 (unit u-media-3-dual))) 8120 1.1 christos ) 8121 1.1 christos 8122 1.1 christos (define-pmacro (saturate arg max min result) 8123 1.1 christos (if (gt arg max) 8124 1.1 christos (set result max) 8125 1.1 christos (if (lt arg min) 8126 1.1 christos (set result min) 8127 1.1 christos (set result arg))) 8128 1.1 christos ) 8129 1.1 christos 8130 1.1 christos (dni msaths 8131 1.1 christos "Media dual saturation signed" 8132 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-1) (FR550-MAJOR M-2) 8133 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-1)) 8134 1.1 christos "msaths$pack $FRinti,$FRintj,$FRintk" 8135 1.1 christos (+ pack FRintk OP_7B FRinti OPE1_0C FRintj) 8136 1.1 christos (sequence ((HI argihi) (HI argilo) (HI argjhi) (HI argjlo)) 8137 1.1 christos (extract-hilo FRinti 0 FRintj 0 argihi argilo argjhi argjlo) 8138 1.1 christos (saturate argihi argjhi (inv argjhi) (halfword hi FRintk 0)) 8139 1.1 christos (saturate argilo argjlo (inv argjlo) (halfword lo FRintk 0))) 8140 1.1 christos ((fr400 (unit u-media-1)) (fr450 (unit u-media-1)) 8141 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media))) 8142 1.1 christos ) 8143 1.1 christos 8144 1.1 christos (dni mqsaths 8145 1.1 christos "Media quad saturation signed" 8146 1.1 christos ((UNIT FMALL) (MACH fr400,fr450,fr550) (FR550-MAJOR M-2) 8147 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-2)) 8148 1.1 christos "mqsaths$pack $FRintieven,$FRintjeven,$FRintkeven" 8149 1.1 christos (+ pack FRintkeven OP_78 FRintieven OPE1_0F FRintjeven) 8150 1.1 christos (if (orif (register-unaligned FRintieven 2) 8151 1.1 christos (orif (register-unaligned FRintjeven 2) 8152 1.1 christos (register-unaligned FRintkeven 2))) 8153 1.1 christos (c-call VOID "@cpu@_media_register_not_aligned") 8154 1.1 christos (sequence ((HI argihi) (HI argilo) (HI argjhi) (HI argjlo)) 8155 1.1 christos ; hack to get FRintkeven referenced as a target for profiling 8156 1.1 christos (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven)) 8157 1.1 christos (extract-hilo FRintieven 0 FRintjeven 0 argihi argilo argjhi argjlo) 8158 1.1 christos (saturate argihi argjhi (inv argjhi) (halfword hi FRintkeven 0)) 8159 1.1 christos (saturate argilo argjlo (inv argjlo) (halfword lo FRintkeven 0)) 8160 1.1 christos (extract-hilo FRintieven 1 FRintjeven 1 argihi argilo argjhi argjlo) 8161 1.1 christos (saturate argihi argjhi (inv argjhi) (halfword hi FRintkeven 1)) 8162 1.1 christos (saturate argilo argjlo (inv argjlo) (halfword lo FRintkeven 1)))) 8163 1.1 christos ((fr400 (unit u-media-1-quad 8164 1.1 christos (in FRinti FRintieven) 8165 1.1 christos (in FRintj FRintjeven) 8166 1.1 christos (out FRintk FRintkeven))) 8167 1.1 christos (fr450 (unit u-media-1-quad 8168 1.1 christos (in FRinti FRintieven) 8169 1.1 christos (in FRintj FRintjeven) 8170 1.1 christos (out FRintk FRintkeven))) 8171 1.1 christos (fr550 (unit u-media-quad))) 8172 1.1 christos ) 8173 1.1 christos 8174 1.1 christos (define-pmacro (saturate-unsigned arg max result) 8175 1.1 christos (if (gt arg max) 8176 1.1 christos (set result max) 8177 1.1 christos (set result arg)) 8178 1.1 christos ) 8179 1.1 christos 8180 1.1 christos (dni msathu 8181 1.1 christos "Media dual saturation unsigned" 8182 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-1) (FR550-MAJOR M-2) 8183 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-1)) 8184 1.1 christos "msathu$pack $FRinti,$FRintj,$FRintk" 8185 1.1 christos (+ pack FRintk OP_7B FRinti OPE1_0D FRintj) 8186 1.1 christos (sequence ((UHI argihi) (UHI argilo) (UHI argjhi) (UHI argjlo)) 8187 1.1 christos (extract-hilo FRinti 0 FRintj 0 argihi argilo argjhi argjlo) 8188 1.1 christos (saturate-unsigned argihi argjhi (halfword hi FRintk 0)) 8189 1.1 christos (saturate-unsigned argilo argjlo (halfword lo FRintk 0))) 8190 1.1 christos ((fr400 (unit u-media-1)) (fr450 (unit u-media-1)) 8191 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media))) 8192 1.1 christos ) 8193 1.1 christos 8194 1.1 christos (define-pmacro (media-dual-compare name mode op ope comment) 8195 1.1 christos (dni name 8196 1.1 christos (comment) 8197 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-1) (FR550-MAJOR M-2) 8198 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-1)) 8199 1.1 christos (.str name "$pack $FRinti,$FRintj,$FCCk") 8200 1.1 christos (+ pack (cond-null) FCCk op FRinti ope FRintj) 8201 1.1 christos (if (register-unaligned FCCk 2) 8202 1.1 christos (c-call VOID "@cpu@_media_cr_not_aligned") 8203 1.1 christos (sequence ((mode argihi) (mode argilo) (mode argjhi) (mode argjlo)) 8204 1.1 christos (extract-hilo FRinti 0 FRintj 0 8205 1.1 christos argihi argilo argjhi argjlo) 8206 1.1 christos (compare-and-set-fcc argihi argjhi FCCk) 8207 1.1 christos (compare-and-set-fcc argilo argjlo (nextreg h-fccr FCCk 1)))) 8208 1.1 christos ; TODO - doesn't handle second FCC 8209 1.1 christos ((fr400 (unit u-media-7)) (fr450 (unit u-media-7)) 8210 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media))) 8211 1.1 christos ) 8212 1.1 christos ) 8213 1.1 christos 8214 1.1 christos (media-dual-compare mcmpsh HI OP_7B OPE1_0E "Media dual compare signed") 8215 1.1 christos (media-dual-compare mcmpuh UHI OP_7B OPE1_0F "Media dual compare unsigned") 8216 1.1 christos 8217 1.1 christos ; Bits for the MSR.SIE field 8218 1.1 christos (define-pmacro (msr-sie-nil) 0) 8219 1.1 christos (define-pmacro (msr-sie-fri-hi) 8) 8220 1.1 christos (define-pmacro (msr-sie-fri-lo) 4) 8221 1.1 christos (define-pmacro (msr-sie-fri-1-hi) 2) 8222 1.1 christos (define-pmacro (msr-sie-fri-1-lo) 1) 8223 1.1 christos (define-pmacro (msr-sie-acci) 8) 8224 1.1 christos (define-pmacro (msr-sie-acci-1) 4) 8225 1.1 christos (define-pmacro (msr-sie-acci-2) 2) 8226 1.1 christos (define-pmacro (msr-sie-acci-3) 1) 8227 1.1 christos 8228 1.1 christos (define-pmacro (saturate-v arg max min sie result) 8229 1.1 christos (if (gt DI arg max) 8230 1.1 christos (sequence () 8231 1.1 christos (set result max) 8232 1.1 christos (c-call VOID "@cpu@_media_overflow" sie)) 8233 1.1 christos (if (lt DI arg min) 8234 1.1 christos (sequence () 8235 1.1 christos (set result min) 8236 1.1 christos (c-call VOID "@cpu@_media_overflow" sie)) 8237 1.1 christos (set result arg))) 8238 1.1 christos ) 8239 1.1 christos 8240 1.1 christos (dni mabshs 8241 1.1 christos "Media dual absolute value, halfword" 8242 1.1 christos ((UNIT FMALL) (MACH fr400,fr450,fr550) (FR550-MAJOR M-2) 8243 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-1)) 8244 1.1 christos "mabshs$pack $FRintj,$FRintk" 8245 1.1 christos (+ pack FRintk OP_78 (FRi-null) OPE1_0A FRintj) 8246 1.1 christos (sequence ((HI arghi) (HI arglo)) 8247 1.1 christos (set FRintj (c-raw-call SI "frv_ref_SI" FRintj)) 8248 1.1 christos (set FRintk (c-raw-call SI "frv_ref_SI" FRintk)) 8249 1.1 christos (set arghi (halfword hi FRintj 0)) 8250 1.1 christos (set arglo (halfword lo FRintj 0)) 8251 1.1 christos ; We extend the argument before the abs operation so we can 8252 1.1 christos ; notice -32768 overflowing as 32768. 8253 1.1 christos (saturate-v (abs (ext DI arghi)) 32767 -32768 (msr-sie-fri-hi) 8254 1.1 christos (halfword hi FRintk 0)) 8255 1.1 christos (saturate-v (abs (ext DI arglo)) 32767 -32768 (msr-sie-fri-lo) 8256 1.1 christos (halfword lo FRintk 0))) 8257 1.1 christos ((fr400 (unit u-media-1)) (fr450 (unit u-media-1)) 8258 1.1 christos (fr550 (unit u-media))) 8259 1.1 christos ) 8260 1.1 christos 8261 1.1 christos ; How to extend from a mode to get the intended signedness. 8262 1.1 christos (define-pmacro (DI-ext-HI x) (ext DI x)) 8263 1.1 christos (define-pmacro (DI-ext-UHI x) (zext DI x)) 8264 1.1 christos (define-pmacro (DI-ext-DI x) x) 8265 1.1 christos 8266 1.1 christos (define-pmacro (media-arith-sat-semantics 8267 1.1 christos operation arg1 arg2 res mode max min sie) 8268 1.1 christos (sequence ((DI tmp)) 8269 1.1 christos ; Make sure we saturate at max/min against a value that is 8270 1.1 christos ; sign- or zero-extended appropriately from "mode". 8271 1.1 christos (set tmp (operation DI 8272 1.1 christos ((.sym DI-ext- mode) arg1) ((.sym DI-ext- mode) arg2))) 8273 1.1 christos (saturate-v tmp max min sie res)) 8274 1.1 christos ) 8275 1.1 christos 8276 1.1 christos (define-pmacro (media-dual-arith-sat-semantics operation mode max min) 8277 1.1 christos (sequence ((mode argihi) (mode argilo) (mode argjhi) (mode argjlo)) 8278 1.1 christos (extract-hilo FRinti 0 FRintj 0 argihi argilo argjhi argjlo) 8279 1.1 christos (media-arith-sat-semantics operation argihi argjhi 8280 1.1 christos (halfword hi FRintk 0) mode max min 8281 1.1 christos (msr-sie-fri-hi)) 8282 1.1 christos (media-arith-sat-semantics operation argilo argjlo 8283 1.1 christos (halfword lo FRintk 0) mode max min 8284 1.1 christos (msr-sie-fri-lo))) 8285 1.1 christos ) 8286 1.1 christos 8287 1.1 christos (define-pmacro (media-dual-arith-sat name operation mode max min op ope comment) 8288 1.1 christos (dni name 8289 1.1 christos (comment) 8290 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-1) (FR550-MAJOR M-2) 8291 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-1)) 8292 1.1 christos (.str name "$pack $FRinti,$FRintj,$FRintk") 8293 1.1 christos (+ pack FRintk op FRinti ope FRintj) 8294 1.1 christos (media-dual-arith-sat-semantics operation mode max min) 8295 1.1 christos ((fr400 (unit u-media-1)) (fr450 (unit u-media-1)) 8296 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media))) 8297 1.1 christos ) 8298 1.1 christos ) 8299 1.1 christos 8300 1.1 christos (media-dual-arith-sat maddhss add HI 32767 -32768 OP_7B OPE1_10 "Media dual add signed with saturation") 8301 1.1 christos (media-dual-arith-sat maddhus add UHI 65535 0 OP_7B OPE1_11 "Media dual add unsigned with saturation") 8302 1.1 christos 8303 1.1 christos (media-dual-arith-sat msubhss sub HI 32767 -32768 OP_7B OPE1_12 "Media dual sub signed with saturation") 8304 1.1 christos (media-dual-arith-sat msubhus sub UHI 65535 0 OP_7B OPE1_13 "Media dual sub unsigned with saturation") 8305 1.1 christos 8306 1.1 christos (define-pmacro (conditional-media-dual-arith-sat 8307 1.1 christos name operation mode max min op ope comment) 8308 1.1 christos (dni name 8309 1.1 christos (comment) 8310 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-1) (FR550-MAJOR M-2) 8311 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-1) CONDITIONAL) 8312 1.1 christos (.str name "$pack $FRinti,$FRintj,$FRintk,$CCi,$cond") 8313 1.1 christos (+ pack FRintk op FRinti CCi cond ope FRintj) 8314 1.1 christos (if (eq CCi (or cond 2)) 8315 1.1 christos (media-dual-arith-sat-semantics operation mode max min)) 8316 1.1 christos ((fr400 (unit u-media-1)) (fr450 (unit u-media-1)) 8317 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media))) 8318 1.1 christos ) 8319 1.1 christos ) 8320 1.1 christos 8321 1.1 christos (conditional-media-dual-arith-sat cmaddhss add HI 32767 -32768 OP_71 OPE4_0 "Conditional Media dual add signed with saturation") 8322 1.1 christos (conditional-media-dual-arith-sat cmaddhus add UHI 65535 0 OP_71 OPE4_1 "Conditional Media dual add unsigned with saturation") 8323 1.1 christos 8324 1.1 christos (conditional-media-dual-arith-sat cmsubhss sub HI 32767 -32768 OP_71 OPE4_2 "Conditional Media dual sub signed with saturation") 8325 1.1 christos (conditional-media-dual-arith-sat cmsubhus sub UHI 65535 0 OP_71 OPE4_3 "Conditional Media dual sub unsigned with saturation") 8326 1.1 christos 8327 1.1 christos (define-pmacro (media-quad-arith-sat-semantics cond operation mode max min) 8328 1.1 christos (if (orif (register-unaligned FRintieven 2) 8329 1.1 christos (orif (register-unaligned FRintjeven 2) 8330 1.1 christos (register-unaligned FRintkeven 2))) 8331 1.1 christos (c-call VOID "@cpu@_media_register_not_aligned") 8332 1.1 christos (if cond 8333 1.1 christos (sequence ((mode argihi) (mode argilo) (mode argjhi) (mode argjlo)) 8334 1.1 christos ; hack to get FRintkeven referenced as a target for profiling 8335 1.1 christos (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven)) 8336 1.1 christos (extract-hilo FRintieven 0 FRintjeven 0 8337 1.1 christos argihi argilo argjhi argjlo) 8338 1.1 christos (media-arith-sat-semantics operation argihi argjhi 8339 1.1 christos (halfword hi FRintkeven 0) mode 8340 1.1 christos max min (msr-sie-fri-hi)) 8341 1.1 christos (media-arith-sat-semantics operation argilo argjlo 8342 1.1 christos (halfword lo FRintkeven 0) mode 8343 1.1 christos max min (msr-sie-fri-lo)) 8344 1.1 christos (extract-hilo FRintieven 1 FRintjeven 1 8345 1.1 christos argihi argilo argjhi argjlo) 8346 1.1 christos (media-arith-sat-semantics operation argihi argjhi 8347 1.1 christos (halfword hi FRintkeven 1) mode 8348 1.1 christos max min (msr-sie-fri-1-hi)) 8349 1.1 christos (media-arith-sat-semantics operation argilo argjlo 8350 1.1 christos (halfword lo FRintkeven 1) mode 8351 1.1 christos max min (msr-sie-fri-1-lo))))) 8352 1.1 christos ) 8353 1.1 christos 8354 1.1 christos (define-pmacro (media-quad-arith-sat name operation mode max min op ope comment) 8355 1.1 christos (dni name 8356 1.1 christos (comment) 8357 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-1) (FR550-MAJOR M-2) 8358 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-2)) 8359 1.1 christos (.str name "$pack $FRintieven,$FRintjeven,$FRintkeven") 8360 1.1 christos (+ pack FRintkeven op FRintieven ope FRintjeven) 8361 1.1 christos (media-quad-arith-sat-semantics 1 operation mode max min) 8362 1.1 christos ((fr400 (unit u-media-1-quad 8363 1.1 christos (in FRinti FRintieven) 8364 1.1 christos (in FRintj FRintjeven) 8365 1.1 christos (out FRintk FRintkeven))) 8366 1.1 christos (fr450 (unit u-media-1-quad 8367 1.1 christos (in FRinti FRintieven) 8368 1.1 christos (in FRintj FRintjeven) 8369 1.1 christos (out FRintk FRintkeven))) 8370 1.1 christos (fr500 (unit u-media-quad-arith 8371 1.1 christos (in FRinti FRintieven) 8372 1.1 christos (in FRintj FRintjeven) 8373 1.1 christos (out FRintk FRintkeven))) (fr550 (unit u-media-quad))) 8374 1.1 christos ) 8375 1.1 christos ) 8376 1.1 christos 8377 1.1 christos (media-quad-arith-sat mqaddhss add HI 32767 -32768 OP_7B OPE1_18 "Media quad add signed with saturation") 8378 1.1 christos (media-quad-arith-sat mqaddhus add UHI 65535 0 OP_7B OPE1_19 "Media quad add unsigned with saturation") 8379 1.1 christos 8380 1.1 christos (media-quad-arith-sat mqsubhss sub HI 32767 -32768 OP_7B OPE1_1A "Media quad sub signed with saturation") 8381 1.1 christos (media-quad-arith-sat mqsubhus sub UHI 65535 0 OP_7B OPE1_1B "Media quad sub unsigned with saturation") 8382 1.1 christos 8383 1.1 christos (define-pmacro (conditional-media-quad-arith-sat 8384 1.1 christos name operation mode max min op ope comment) 8385 1.1 christos (dni name 8386 1.1 christos (comment) 8387 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-1) (FR550-MAJOR M-2) 8388 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-2) CONDITIONAL) 8389 1.1 christos (.str name "$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond") 8390 1.1 christos (+ pack FRintkeven op FRintieven CCi cond ope FRintjeven) 8391 1.1 christos (media-quad-arith-sat-semantics (eq CCi (or cond 2)) 8392 1.1 christos operation mode max min) 8393 1.1 christos ((fr400 (unit u-media-1-quad 8394 1.1 christos (in FRinti FRintieven) 8395 1.1 christos (in FRintj FRintjeven) 8396 1.1 christos (out FRintk FRintkeven))) 8397 1.1 christos (fr450 (unit u-media-1-quad 8398 1.1 christos (in FRinti FRintieven) 8399 1.1 christos (in FRintj FRintjeven) 8400 1.1 christos (out FRintk FRintkeven))) 8401 1.1 christos (fr500 (unit u-media-quad-arith 8402 1.1 christos (in FRinti FRintieven) 8403 1.1 christos (in FRintj FRintjeven) 8404 1.1 christos (out FRintk FRintkeven))) (fr550 (unit u-media-quad))) 8405 1.1 christos ) 8406 1.1 christos ) 8407 1.1 christos 8408 1.1 christos (conditional-media-quad-arith-sat cmqaddhss add HI 32767 -32768 OP_73 OPE4_0 "Conditional Media quad add signed with saturation") 8409 1.1 christos (conditional-media-quad-arith-sat cmqaddhus add UHI 65535 0 OP_73 OPE4_1 "Conditional Media quad add unsigned with saturation") 8410 1.1 christos 8411 1.1 christos (conditional-media-quad-arith-sat cmqsubhss sub HI 32767 -32768 OP_73 OPE4_2 "Conditional Media quad sub signed with saturation") 8412 1.1 christos (conditional-media-quad-arith-sat cmqsubhus sub UHI 65535 0 OP_73 OPE4_3 "Conditional Media quad sub unsigned with saturation") 8413 1.1 christos 8414 1.1 christos ;; Return A if |A| > |B| and B is positive. Return -A if |A| > |B| and 8415 1.1 christos ;; B is negative, saturating 0x8000 as 0x7fff. Return 0 otherwise. 8416 1.1 christos (define-pmacro (media-low-clear-semantics a b) 8417 1.1 christos (cond HI 8418 1.1 christos ((le UHI (abs a) (abs b)) 0) 8419 1.1 christos ((le HI 0 b) a) 8420 1.1 christos ((eq HI a -32768) 32767) 8421 1.1 christos (else (neg a)))) 8422 1.1 christos 8423 1.1 christos ;; Return A if -|B| < A < |B|. Return -B if A <= -|B|, saturating 0x8000 8424 1.1 christos ;; as 0x7fff. Return B if A >= |B|. 8425 1.1 christos (define-pmacro (media-scope-limit-semantics a b) 8426 1.1 christos (cond HI 8427 1.1 christos ((andif (gt HI b -32768) 8428 1.1 christos (ge HI a (abs b))) b) 8429 1.1 christos ((gt HI a (neg (abs b))) a) 8430 1.1 christos ((eq HI b -32768) 32767) 8431 1.1 christos (else (neg b)))) 8432 1.1 christos 8433 1.1 christos (define-pmacro (media-quad-limit name operation op ope comment) 8434 1.1 christos (dni name 8435 1.1 christos comment 8436 1.1 christos ((UNIT FM0) (MACH fr450) (FR450-MAJOR M-2)) 8437 1.1 christos (.str name "$pack $FRintieven,$FRintjeven,$FRintkeven") 8438 1.1 christos (+ pack FRintkeven op FRintieven ope FRintjeven) 8439 1.1 christos (if (orif (register-unaligned FRintieven 2) 8440 1.1 christos (orif (register-unaligned FRintjeven 2) 8441 1.1 christos (register-unaligned FRintkeven 2))) 8442 1.1 christos (c-call VOID "@cpu@_media_register_not_aligned") 8443 1.1 christos (sequence ((HI a1) (HI a2) (HI a3) (HI a4) 8444 1.1 christos (HI b1) (HI b2) (HI b3) (HI b4)) 8445 1.1 christos ; hack to get FRintkeven referenced as a target 8446 1.1 christos ; for profiling 8447 1.1 christos (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven)) 8448 1.1 christos (extract-hilo FRintieven 0 FRintjeven 0 a1 a2 b1 b2) 8449 1.1 christos (extract-hilo FRintieven 1 FRintjeven 1 a3 a4 b3 b4) 8450 1.1 christos (set (halfword hi FRintkeven 0) (operation a1 b1)) 8451 1.1 christos (set (halfword lo FRintkeven 0) (operation a2 b2)) 8452 1.1 christos (set (halfword hi FRintkeven 1) (operation a3 b3)) 8453 1.1 christos (set (halfword lo FRintkeven 1) (operation a4 b4)))) 8454 1.1 christos ((fr450 (unit u-media-1-quad 8455 1.1 christos (in FRinti FRintieven) 8456 1.1 christos (in FRintj FRintjeven) 8457 1.1 christos (out FRintk FRintkeven)))) 8458 1.1 christos ) 8459 1.1 christos ) 8460 1.1 christos 8461 1.1 christos (media-quad-limit mqlclrhs media-low-clear-semantics OP_78 OPE1_10 8462 1.1 christos "Media quad low clear") 8463 1.1 christos (media-quad-limit mqlmths media-scope-limit-semantics OP_78 OPE1_14 8464 1.1 christos "Media quad scope limitation") 8465 1.1 christos 8466 1.1 christos (define-pmacro (media-quad-shift name operation op ope comment) 8467 1.1 christos (dni name 8468 1.1 christos (comment) 8469 1.1 christos ((UNIT FM0) (MACH fr450) (FR450-MAJOR M-2)) 8470 1.1 christos (.str name "$pack $FRintieven,$u6,$FRintkeven") 8471 1.1 christos (+ pack FRintkeven op FRintieven ope u6) 8472 1.1 christos (if (orif (register-unaligned FRintieven 2) 8473 1.1 christos (register-unaligned FRintkeven 2)) 8474 1.1 christos (c-call VOID "@cpu@_media_register_not_aligned") 8475 1.1 christos (sequence () 8476 1.1 christos ; hack to get these referenced for profiling 8477 1.1 christos (set FRintieven (c-raw-call SI "frv_ref_SI" FRintieven)) 8478 1.1 christos (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven)) 8479 1.1 christos (set (halfword hi FRintkeven 0) 8480 1.1 christos (operation HI (halfword hi FRintieven 0) 8481 1.1 christos (and u6 #xf))) 8482 1.1 christos (set (halfword lo FRintkeven 0) 8483 1.1 christos (operation HI (halfword lo FRintieven 0) 8484 1.1 christos (and u6 #xf))) 8485 1.1 christos (set (halfword hi FRintkeven 1) 8486 1.1 christos (operation HI (halfword hi FRintieven 1) 8487 1.1 christos (and u6 #xf))) 8488 1.1 christos (set (halfword lo FRintkeven 1) 8489 1.1 christos (operation HI (halfword lo FRintieven 1) 8490 1.1 christos (and u6 #xf))))) 8491 1.1 christos ((fr450 (unit u-media-3-quad 8492 1.1 christos (in FRinti FRintieven) 8493 1.1 christos (in FRintj FRintieven) 8494 1.1 christos (out FRintk FRintkeven)))) 8495 1.1 christos ) 8496 1.1 christos ) 8497 1.1 christos 8498 1.1 christos (media-quad-shift mqsllhi sll OP_78 OPE1_11 "Media quad left shift") 8499 1.1 christos (media-quad-shift mqsrahi sra OP_78 OPE1_13 "Media quad right shift") 8500 1.1 christos 8501 1.1 christos (define-pmacro (media-acc-arith-sat name operation mode max min op ope comment) 8502 1.1 christos (dni name 8503 1.1 christos (comment) 8504 1.1 christos ((UNIT FMALL) (MACH fr400,fr450,fr550) (FR550-MAJOR M-4) 8505 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-3)) 8506 1.1 christos (.str name "$pack $ACC40Si,$ACC40Sk") 8507 1.1 christos (+ pack ACC40Sk op ACC40Si ope (ACCj-null)) 8508 1.1 christos (if (c-call SI "@cpu@_check_acc_range" (index-of ACC40Si)) 8509 1.1 christos (if (c-call SI "@cpu@_check_acc_range" (index-of ACC40Sk)) 8510 1.1 christos (if (register-unaligned ACC40Si 2) 8511 1.1 christos (c-call VOID "@cpu@_media_acc_not_aligned") 8512 1.1 christos (media-arith-sat-semantics operation ACC40Si 8513 1.1 christos (nextreg h-acc40S ACC40Si 1) 8514 1.1 christos ACC40Sk mode max min (msr-sie-acci))))) 8515 1.1 christos ((fr400 (unit u-media-2-acc)) (fr450 (unit u-media-2-acc)) 8516 1.1 christos (fr550 (unit u-media-4-acc))) 8517 1.1 christos ) 8518 1.1 christos ) 8519 1.1 christos 8520 1.1 christos (media-acc-arith-sat maddaccs add DI #x7fffffffff (inv DI #x7fffffffff) 8521 1.1 christos OP_78 OPE1_04 "Media accumulator addition") 8522 1.1 christos (media-acc-arith-sat msubaccs sub DI #x7fffffffff (inv DI #x7fffffffff) 8523 1.1 christos OP_78 OPE1_05 "Media accumulator subtraction") 8524 1.1 christos 8525 1.1 christos (define-pmacro (media-dual-acc-arith-sat name operation mode max min op ope 8526 1.1 christos comment) 8527 1.1 christos (dni name 8528 1.1 christos (comment) 8529 1.1 christos ((UNIT MDUALACC) (MACH fr400,fr450,fr550) (FR550-MAJOR M-4) 8530 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-4)) 8531 1.1 christos (.str name "$pack $ACC40Si,$ACC40Sk") 8532 1.1 christos (+ pack ACC40Sk op ACC40Si ope (ACCj-null)) 8533 1.1 christos (if (c-call SI "@cpu@_check_acc_range" (index-of ACC40Si)) 8534 1.1 christos (if (c-call SI "@cpu@_check_acc_range" (index-of ACC40Sk)) 8535 1.1 christos (if (register-unaligned ACC40Si 4) 8536 1.1 christos (c-call VOID "@cpu@_media_acc_not_aligned") 8537 1.1 christos (if (register-unaligned ACC40Sk 2) 8538 1.1 christos (c-call VOID "@cpu@_media_acc_not_aligned") 8539 1.1 christos (sequence () 8540 1.1 christos (media-arith-sat-semantics operation ACC40Si 8541 1.1 christos (nextreg h-acc40S ACC40Si 1) 8542 1.1 christos ACC40Sk mode max min 8543 1.1 christos (msr-sie-acci)) 8544 1.1 christos (media-arith-sat-semantics operation 8545 1.1 christos (nextreg h-acc40S ACC40Si 2) 8546 1.1 christos (nextreg h-acc40S ACC40Si 3) 8547 1.1 christos (nextreg h-acc40S ACC40Sk 1) 8548 1.1 christos mode max min 8549 1.1 christos (msr-sie-acci-1))))))) 8550 1.1 christos ((fr400 (unit u-media-2-acc-dual)) (fr450 (unit u-media-2-acc-dual)) 8551 1.1 christos (fr550 (unit u-media-4-acc-dual))) 8552 1.1 christos ) 8553 1.1 christos ) 8554 1.1 christos 8555 1.1 christos (media-dual-acc-arith-sat mdaddaccs add DI #x7fffffffff (inv DI #x7fffffffff) 8556 1.1 christos OP_78 OPE1_06 "Media accumulator addition") 8557 1.1 christos (media-dual-acc-arith-sat mdsubaccs sub DI #x7fffffffff (inv DI #x7fffffffff) 8558 1.1 christos OP_78 OPE1_07 "Media accumulator subtraction") 8559 1.1 christos 8560 1.1 christos (dni masaccs 8561 1.1 christos "Media add and subtract signed accumulator with saturation" 8562 1.1 christos ((UNIT FMALL) (MACH fr400,fr450,fr550) (FR550-MAJOR M-4) 8563 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-3)) 8564 1.1 christos "masaccs$pack $ACC40Si,$ACC40Sk" 8565 1.1 christos (+ pack ACC40Sk OP_78 ACC40Si OPE1_08 (ACCj-null)) 8566 1.1 christos (if (c-call SI "@cpu@_check_acc_range" (index-of ACC40Si)) 8567 1.1 christos (if (c-call SI "@cpu@_check_acc_range" (index-of ACC40Sk)) 8568 1.1 christos (if (register-unaligned ACC40Si 2) 8569 1.1 christos (c-call VOID "@cpu@_media_acc_not_aligned") 8570 1.1 christos (if (register-unaligned ACC40Sk 2) 8571 1.1 christos (c-call VOID "@cpu@_media_acc_not_aligned") 8572 1.1 christos (sequence () 8573 1.1 christos (media-arith-sat-semantics add ACC40Si 8574 1.1 christos (nextreg h-acc40S ACC40Si 1) 8575 1.1 christos ACC40Sk DI 8576 1.1 christos #x7fffffffff 8577 1.1 christos (inv DI #x7fffffffff) 8578 1.1 christos (msr-sie-acci)) 8579 1.1 christos (media-arith-sat-semantics sub ACC40Si 8580 1.1 christos (nextreg h-acc40S ACC40Si 1) 8581 1.1 christos (nextreg h-acc40S ACC40Sk 1) 8582 1.1 christos DI 8583 1.1 christos #x7fffffffff 8584 1.1 christos (inv DI #x7fffffffff) 8585 1.1 christos (msr-sie-acci-1))))))) 8586 1.1 christos ((fr400 (unit u-media-2-add-sub)) (fr450 (unit u-media-2-add-sub)) 8587 1.1 christos (fr550 (unit u-media-4-add-sub))) 8588 1.1 christos ) 8589 1.1 christos 8590 1.1 christos (dni mdasaccs 8591 1.1 christos "Media add and subtract signed accumulator with saturation" 8592 1.1 christos ((UNIT MDUALACC) (MACH fr400,fr450,fr550) (FR550-MAJOR M-4) 8593 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-4)) 8594 1.1 christos "mdasaccs$pack $ACC40Si,$ACC40Sk" 8595 1.1 christos (+ pack ACC40Sk OP_78 ACC40Si OPE1_09 (ACCj-null)) 8596 1.1 christos (if (c-call SI "@cpu@_check_acc_range" (index-of ACC40Si)) 8597 1.1 christos (if (c-call SI "@cpu@_check_acc_range" (index-of ACC40Sk)) 8598 1.1 christos (if (register-unaligned ACC40Si 4) 8599 1.1 christos (c-call VOID "@cpu@_media_acc_not_aligned") 8600 1.1 christos (if (register-unaligned ACC40Sk 4) 8601 1.1 christos (c-call VOID "@cpu@_media_acc_not_aligned") 8602 1.1 christos (sequence () 8603 1.1 christos (media-arith-sat-semantics add ACC40Si 8604 1.1 christos (nextreg h-acc40S ACC40Si 1) 8605 1.1 christos ACC40Sk DI 8606 1.1 christos #x7fffffffff 8607 1.1 christos (inv DI #x7fffffffff) 8608 1.1 christos (msr-sie-acci)) 8609 1.1 christos (media-arith-sat-semantics sub ACC40Si 8610 1.1 christos (nextreg h-acc40S ACC40Si 1) 8611 1.1 christos (nextreg h-acc40S ACC40Sk 1) 8612 1.1 christos DI 8613 1.1 christos #x7fffffffff 8614 1.1 christos (inv DI #x7fffffffff) 8615 1.1 christos (msr-sie-acci-1)) 8616 1.1 christos (media-arith-sat-semantics add 8617 1.1 christos (nextreg h-acc40S ACC40Si 2) 8618 1.1 christos (nextreg h-acc40S ACC40Si 3) 8619 1.1 christos (nextreg h-acc40S ACC40Sk 2) 8620 1.1 christos DI 8621 1.1 christos #x7fffffffff 8622 1.1 christos (inv DI #x7fffffffff) 8623 1.1 christos (msr-sie-acci-2)) 8624 1.1 christos (media-arith-sat-semantics sub 8625 1.1 christos (nextreg h-acc40S ACC40Si 2) 8626 1.1 christos (nextreg h-acc40S ACC40Si 3) 8627 1.1 christos (nextreg h-acc40S ACC40Sk 3) 8628 1.1 christos DI 8629 1.1 christos #x7fffffffff 8630 1.1 christos (inv DI #x7fffffffff) 8631 1.1 christos (msr-sie-acci-3))))))) 8632 1.1 christos ((fr400 (unit u-media-2-add-sub-dual)) 8633 1.1 christos (fr450 (unit u-media-2-add-sub-dual)) 8634 1.1 christos (fr550 (unit u-media-4-add-sub-dual))) 8635 1.1 christos ) 8636 1.1 christos 8637 1.1 christos (define-pmacro (media-multiply-semantics conv arg1 arg2 res) 8638 1.1 christos (set res (mul DI (conv DI arg1) (conv DI arg2))) 8639 1.1 christos ) 8640 1.1 christos 8641 1.1 christos (define-pmacro (media-dual-multiply-semantics cond mode conv rhs1 rhs2) 8642 1.1 christos (if (c-call SI "@cpu@_check_acc_range" (index-of ACC40Sk)) 8643 1.1 christos (if (register-unaligned ACC40Sk 2) 8644 1.1 christos (c-call VOID "@cpu@_media_acc_not_aligned") 8645 1.1 christos (if cond 8646 1.1 christos (sequence ((mode argihi) (mode argilo) (mode argjhi) (mode argjlo)) 8647 1.1 christos (extract-hilo FRinti 0 FRintj 0 8648 1.1 christos argihi argilo argjhi argjlo) 8649 1.1 christos (media-multiply-semantics conv argihi rhs1 ACC40Sk) 8650 1.1 christos (media-multiply-semantics conv argilo rhs2 8651 1.1 christos (nextreg h-acc40S ACC40Sk 1)))))) 8652 1.1 christos ) 8653 1.1 christos 8654 1.1 christos (define-pmacro (media-dual-multiply name mode conv rhs1 rhs2 op ope comment) 8655 1.1 christos (dni name 8656 1.1 christos (comment) 8657 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-4) (FR550-MAJOR M-4) 8658 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-3) PRESERVE-OVF) 8659 1.1 christos (.str name "$pack $FRinti,$FRintj,$ACC40Sk") 8660 1.1 christos (+ pack ACC40Sk op FRinti ope FRintj) 8661 1.1 christos (media-dual-multiply-semantics 1 mode conv rhs1 rhs2) 8662 1.1 christos ((fr400 (unit u-media-2)) (fr450 (unit u-media-2)) 8663 1.1 christos (fr500 (unit u-media-dual-mul)) (fr550 (unit u-media-4))) 8664 1.1 christos ) 8665 1.1 christos ) 8666 1.1 christos 8667 1.1 christos (media-dual-multiply mmulhs HI ext argjhi argjlo OP_7B OPE1_14 "Media dual multiply signed") 8668 1.1 christos (media-dual-multiply mmulhu UHI zext argjhi argjlo OP_7B OPE1_15 "Media dual multiply unsigned") 8669 1.1 christos 8670 1.1 christos (media-dual-multiply mmulxhs HI ext argjlo argjhi OP_7B OPE1_28 "Media dual cross multiply signed") 8671 1.1 christos (media-dual-multiply mmulxhu UHI zext argjlo argjhi OP_7B OPE1_29 "Media dual cross multiply unsigned") 8672 1.1 christos 8673 1.1 christos (define-pmacro (conditional-media-dual-multiply 8674 1.1 christos name mode conv rhs1 rhs2 op ope comment) 8675 1.1 christos (dni name 8676 1.1 christos (comment) 8677 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-4) (FR550-MAJOR M-4) 8678 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-3) 8679 1.1 christos PRESERVE-OVF CONDITIONAL) 8680 1.1 christos (.str name "$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond") 8681 1.1 christos (+ pack ACC40Sk op FRinti CCi cond ope FRintj) 8682 1.1 christos (media-dual-multiply-semantics (eq CCi (or cond 2)) mode conv rhs1 rhs2) 8683 1.1 christos ((fr400 (unit u-media-2)) (fr450 (unit u-media-2)) 8684 1.1 christos (fr500 (unit u-media-dual-mul)) (fr550 (unit u-media-4))) 8685 1.1 christos ) 8686 1.1 christos ) 8687 1.1 christos 8688 1.1 christos (conditional-media-dual-multiply cmmulhs HI ext argjhi argjlo OP_72 OPE4_0 "Conditional Media dual multiply signed") 8689 1.1 christos (conditional-media-dual-multiply cmmulhu UHI zext argjhi argjlo OP_72 OPE4_1 "Conditional Media dual multiply unsigned") 8690 1.1 christos 8691 1.1 christos (define-pmacro (media-quad-multiply-semantics cond mode conv rhs1 rhs2) 8692 1.1 christos (if (c-call SI "@cpu@_check_acc_range" (index-of ACC40Sk)) 8693 1.1 christos (if (register-unaligned ACC40Sk 4) 8694 1.1 christos (c-call VOID "@cpu@_media_acc_not_aligned") 8695 1.1 christos (if (orif (register-unaligned FRintieven 2) 8696 1.1 christos (register-unaligned FRintjeven 2)) 8697 1.1 christos (c-call VOID "@cpu@_media_register_not_aligned") 8698 1.1 christos (if cond 8699 1.1 christos (sequence ((mode argihi) (mode argilo) 8700 1.1 christos (mode argjhi) (mode argjlo)) 8701 1.1 christos (extract-hilo FRintieven 0 FRintjeven 0 8702 1.1 christos argihi argilo argjhi argjlo) 8703 1.1 christos (media-multiply-semantics conv argihi rhs1 ACC40Sk) 8704 1.1 christos (media-multiply-semantics conv argilo rhs2 8705 1.1 christos (nextreg h-acc40S ACC40Sk 1)) 8706 1.1 christos (extract-hilo FRintieven 1 FRintjeven 1 8707 1.1 christos argihi argilo argjhi argjlo) 8708 1.1 christos (media-multiply-semantics conv argihi rhs1 8709 1.1 christos (nextreg h-acc40S ACC40Sk 2)) 8710 1.1 christos (media-multiply-semantics conv argilo rhs2 8711 1.1 christos (nextreg h-acc40S ACC40Sk 3))))))) 8712 1.1 christos ) 8713 1.1 christos 8714 1.1 christos (define-pmacro (media-quad-multiply name mode conv rhs1 rhs2 op ope comment) 8715 1.1 christos (dni name 8716 1.1 christos (comment) 8717 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-4) (FR550-MAJOR M-4) 8718 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-4) PRESERVE-OVF) 8719 1.1 christos (.str name "$pack $FRintieven,$FRintjeven,$ACC40Sk") 8720 1.1 christos (+ pack ACC40Sk op FRintieven ope FRintjeven) 8721 1.1 christos (media-quad-multiply-semantics 1 mode conv rhs1 rhs2) 8722 1.1 christos ((fr400 (unit u-media-2-quad 8723 1.1 christos (in FRinti FRintieven) 8724 1.1 christos (in FRintj FRintjeven))) 8725 1.1 christos (fr450 (unit u-media-2-quad 8726 1.1 christos (in FRinti FRintieven) 8727 1.1 christos (in FRintj FRintjeven))) 8728 1.1 christos (fr500 (unit u-media-quad-mul 8729 1.1 christos (in FRinti FRintieven) 8730 1.1 christos (in FRintj FRintjeven))) (fr550 (unit u-media-4-quad))) 8731 1.1 christos ) 8732 1.1 christos ) 8733 1.1 christos 8734 1.1 christos (media-quad-multiply mqmulhs HI ext argjhi argjlo OP_7B OPE1_1C "Media quad multiply signed") 8735 1.1 christos (media-quad-multiply mqmulhu UHI zext argjhi argjlo OP_7B OPE1_1D "Media quad multiply unsigned") 8736 1.1 christos 8737 1.1 christos (media-quad-multiply mqmulxhs HI ext argjlo argjhi OP_7B OPE1_2A "Media quad cross multiply signed") 8738 1.1 christos (media-quad-multiply mqmulxhu UHI zext argjlo argjhi OP_7B OPE1_2B "Media quad cross multiply unsigned") 8739 1.1 christos 8740 1.1 christos (define-pmacro (conditional-media-quad-multiply 8741 1.1 christos name mode conv rhs1 rhs2 op ope comment) 8742 1.1 christos (dni name 8743 1.1 christos (comment) 8744 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-4) (FR550-MAJOR M-4) 8745 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-4) 8746 1.1 christos PRESERVE-OVF CONDITIONAL) 8747 1.1 christos (.str name "$pack $FRintieven,$FRintjeven,$ACC40Sk,$CCi,$cond") 8748 1.1 christos (+ pack ACC40Sk op FRintieven CCi cond ope FRintjeven) 8749 1.1 christos (media-quad-multiply-semantics (eq CCi (or cond 2)) mode conv rhs1 rhs2) 8750 1.1 christos ((fr400 (unit u-media-2-quad 8751 1.1 christos (in FRinti FRintieven) 8752 1.1 christos (in FRintj FRintjeven))) 8753 1.1 christos (fr450 (unit u-media-2-quad 8754 1.1 christos (in FRinti FRintieven) 8755 1.1 christos (in FRintj FRintjeven))) 8756 1.1 christos (fr500 (unit u-media-quad-mul 8757 1.1 christos (in FRinti FRintieven) 8758 1.1 christos (in FRintj FRintjeven))) (fr550 (unit u-media-4-quad))) 8759 1.1 christos ) 8760 1.1 christos ) 8761 1.1 christos 8762 1.1 christos (conditional-media-quad-multiply cmqmulhs HI ext argjhi argjlo OP_74 OPE4_0 "Conditional Media quad multiply signed") 8763 1.1 christos (conditional-media-quad-multiply cmqmulhu UHI zext argjhi argjlo OP_74 OPE4_1 "Conditional Media quad multiply unsigned") 8764 1.1 christos 8765 1.1 christos (define-pmacro (media-multiply-acc-semantics 8766 1.1 christos conv arg1 addop arg2 res max min sie) 8767 1.1 christos (sequence ((DI tmp)) 8768 1.1 christos (set tmp (addop res (mul DI (conv DI arg1) (conv DI arg2)))) 8769 1.1 christos (saturate-v tmp max min sie res)) 8770 1.1 christos ) 8771 1.1 christos 8772 1.1 christos (define-pmacro (media-dual-multiply-acc-semantics 8773 1.1 christos cond mode conv addop rhw res max min) 8774 1.1 christos (if (c-call SI "@cpu@_check_acc_range" (index-of res)) 8775 1.1 christos (if (register-unaligned res 2) 8776 1.1 christos (c-call VOID "@cpu@_media_acc_not_aligned") 8777 1.1 christos (if cond 8778 1.1 christos (sequence ((mode argihi) (mode argilo) (mode argjhi) (mode argjlo)) 8779 1.1 christos (extract-hilo FRinti 0 FRintj 0 8780 1.1 christos argihi argilo argjhi argjlo) 8781 1.1 christos (media-multiply-acc-semantics conv argihi addop argjhi 8782 1.1 christos res 8783 1.1 christos max min (msr-sie-acci)) 8784 1.1 christos (media-multiply-acc-semantics conv argilo addop argjlo 8785 1.1 christos (nextreg rhw res 1) 8786 1.1 christos max min (msr-sie-acci-1)))))) 8787 1.1 christos ) 8788 1.1 christos 8789 1.1 christos (define-pmacro (media-dual-multiply-acc 8790 1.1 christos name mode conv addop rhw res max min op ope comment) 8791 1.1 christos (dni name 8792 1.1 christos (comment) 8793 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-4) (FR550-MAJOR M-4) 8794 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-3)) 8795 1.1 christos (.str name "$pack $FRinti,$FRintj,$" res) 8796 1.1 christos (+ pack res op FRinti ope FRintj) 8797 1.1 christos (media-dual-multiply-acc-semantics 1 mode conv addop rhw res max min) 8798 1.1 christos ((fr400 (unit u-media-2)) (fr450 (unit u-media-2)) 8799 1.1 christos (fr500 (unit u-media-dual-mul)) (fr550 (unit u-media-4))) 8800 1.1 christos ) 8801 1.1 christos ) 8802 1.1 christos 8803 1.1 christos (media-dual-multiply-acc mmachs HI ext add h-acc40S ACC40Sk 8804 1.1 christos (const DI #x7fffffffff) (const DI #xffffff8000000000) 8805 1.1 christos OP_7B OPE1_16 8806 1.1 christos "Media dual multiply and accumulate signed") 8807 1.1 christos 8808 1.1 christos (media-dual-multiply-acc mmachu UHI zext add h-acc40U ACC40Uk 8809 1.1 christos (const DI #xffffffffff) (const DI 0) 8810 1.1 christos OP_7B OPE1_17 8811 1.1 christos "Media dual multiply and accumulate unsigned") 8812 1.1 christos 8813 1.1 christos (media-dual-multiply-acc mmrdhs HI ext sub h-acc40S ACC40Sk 8814 1.1 christos (const DI #x7fffffffff) (const DI #xffffff8000000000) 8815 1.1 christos OP_7B OPE1_30 8816 1.1 christos "Media dual multiply and reduce signed") 8817 1.1 christos 8818 1.1 christos (media-dual-multiply-acc mmrdhu UHI zext sub h-acc40U ACC40Uk 8819 1.1 christos (const DI #xffffffffff) (const DI 0) 8820 1.1 christos OP_7B OPE1_31 8821 1.1 christos "Media dual multiply and reduce unsigned") 8822 1.1 christos 8823 1.1 christos (define-pmacro (conditional-media-dual-multiply-acc 8824 1.1 christos name mode conv addop rhw res max min op ope comment) 8825 1.1 christos (dni name 8826 1.1 christos (comment) 8827 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-4) (FR550-MAJOR M-4) 8828 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-3) CONDITIONAL) 8829 1.1 christos (.str name "$pack $FRinti,$FRintj,$" res ",$CCi,$cond") 8830 1.1 christos (+ pack res op FRinti CCi cond ope FRintj) 8831 1.1 christos (media-dual-multiply-acc-semantics (eq CCi (or cond 2)) 8832 1.1 christos mode conv addop rhw res max min) 8833 1.1 christos ((fr400 (unit u-media-2)) (fr450 (unit u-media-2)) 8834 1.1 christos (fr500 (unit u-media-dual-mul)) (fr550 (unit u-media-4))) 8835 1.1 christos ) 8836 1.1 christos ) 8837 1.1 christos 8838 1.1 christos (conditional-media-dual-multiply-acc cmmachs HI ext add h-acc40S ACC40Sk 8839 1.1 christos (const DI #x7fffffffff) (const DI #xffffff8000000000) 8840 1.1 christos OP_72 OPE4_2 8841 1.1 christos "Conditional Media dual multiply and accumulate signed") 8842 1.1 christos 8843 1.1 christos (conditional-media-dual-multiply-acc cmmachu UHI zext add h-acc40U ACC40Uk 8844 1.1 christos (const DI #xffffffffff) (const DI 0) 8845 1.1 christos OP_72 OPE4_3 8846 1.1 christos "Conditional Media dual multiply and accumulate unsigned") 8847 1.1 christos 8848 1.1 christos (define-pmacro (media-quad-multiply-acc-semantics 8849 1.1 christos cond mode conv addop rhw res max min) 8850 1.1 christos (if (c-call SI "@cpu@_check_acc_range" (index-of res)) 8851 1.1 christos (if (register-unaligned res 4) 8852 1.1 christos (c-call VOID "@cpu@_media_acc_not_aligned") 8853 1.1 christos (if (orif (register-unaligned FRintieven 2) 8854 1.1 christos (register-unaligned FRintjeven 2)) 8855 1.1 christos (c-call VOID "@cpu@_media_register_not_aligned") 8856 1.1 christos (if cond 8857 1.1 christos (sequence ((mode argihi) (mode argilo) 8858 1.1 christos (mode argjhi) (mode argjlo)) 8859 1.1 christos (extract-hilo FRintieven 0 FRintjeven 0 8860 1.1 christos argihi argilo argjhi argjlo) 8861 1.1 christos (media-multiply-acc-semantics conv argihi addop argjhi 8862 1.1 christos res 8863 1.1 christos max min (msr-sie-acci)) 8864 1.1 christos (media-multiply-acc-semantics conv argilo addop argjlo 8865 1.1 christos (nextreg rhw res 1) 8866 1.1 christos max min (msr-sie-acci-1)) 8867 1.1 christos (extract-hilo FRintieven 1 FRintjeven 1 8868 1.1 christos argihi argilo argjhi argjlo) 8869 1.1 christos (media-multiply-acc-semantics conv argihi addop argjhi 8870 1.1 christos (nextreg rhw res 2) 8871 1.1 christos max min (msr-sie-acci-2)) 8872 1.1 christos (media-multiply-acc-semantics conv argilo addop argjlo 8873 1.1 christos (nextreg rhw res 3) 8874 1.1 christos max min 8875 1.1 christos (msr-sie-acci-3))))))) 8876 1.1 christos ) 8877 1.1 christos 8878 1.1 christos (define-pmacro (media-quad-multiply-acc 8879 1.1 christos name mode conv addop rhw res max min op ope comment) 8880 1.1 christos (dni name 8881 1.1 christos (comment) 8882 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-4) (FR550-MAJOR M-4) 8883 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-4)) 8884 1.1 christos (.str name "$pack $FRintieven,$FRintjeven,$" res) 8885 1.1 christos (+ pack res op FRintieven ope FRintjeven) 8886 1.1 christos (media-quad-multiply-acc-semantics 1 mode conv addop rhw res max min) 8887 1.1 christos ((fr400 (unit u-media-2-quad 8888 1.1 christos (in FRinti FRintieven) 8889 1.1 christos (in FRintj FRintjeven))) 8890 1.1 christos (fr450 (unit u-media-2-quad 8891 1.1 christos (in FRinti FRintieven) 8892 1.1 christos (in FRintj FRintjeven))) 8893 1.1 christos (fr500 (unit u-media-quad-mul 8894 1.1 christos (in FRinti FRintieven) 8895 1.1 christos (in FRintj FRintjeven))) (fr550 (unit u-media-4-quad))) 8896 1.1 christos ) 8897 1.1 christos ) 8898 1.1 christos 8899 1.1 christos (media-quad-multiply-acc mqmachs HI ext add h-acc40S ACC40Sk 8900 1.1 christos (const DI #x7fffffffff) (const DI #xffffff8000000000) 8901 1.1 christos OP_7B OPE1_1E 8902 1.1 christos "Media quad multiply and accumulate signed") 8903 1.1 christos 8904 1.1 christos (media-quad-multiply-acc mqmachu UHI zext add h-acc40U ACC40Uk 8905 1.1 christos (const DI #xffffffffff) (const DI 0) 8906 1.1 christos OP_7B OPE1_1F 8907 1.1 christos "Media quad multiply and accumulate unsigned") 8908 1.1 christos 8909 1.1 christos (define-pmacro (conditional-media-quad-multiply-acc 8910 1.1 christos name mode conv addop rhw res max min op ope comment) 8911 1.1 christos (dni name 8912 1.1 christos (comment) 8913 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-4) (FR550-MAJOR M-4) 8914 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-4) CONDITIONAL) 8915 1.1 christos (.str name "$pack $FRintieven,$FRintjeven,$" res ",$CCi,$cond") 8916 1.1 christos (+ pack res op FRintieven CCi cond ope FRintjeven) 8917 1.1 christos (media-quad-multiply-acc-semantics (eq CCi (or cond 2)) 8918 1.1 christos mode conv addop rhw res max min) 8919 1.1 christos ((fr400 (unit u-media-2-quad 8920 1.1 christos (in FRinti FRintieven) 8921 1.1 christos (in FRintj FRintjeven))) 8922 1.1 christos (fr450 (unit u-media-2-quad 8923 1.1 christos (in FRinti FRintieven) 8924 1.1 christos (in FRintj FRintjeven))) 8925 1.1 christos (fr500 (unit u-media-quad-mul 8926 1.1 christos (in FRinti FRintieven) 8927 1.1 christos (in FRintj FRintjeven))) (fr550 (unit u-media-4-quad))) 8928 1.1 christos ) 8929 1.1 christos ) 8930 1.1 christos 8931 1.1 christos (conditional-media-quad-multiply-acc cmqmachs HI ext add h-acc40S ACC40Sk 8932 1.1 christos (const DI #x7fffffffff) (const DI #xffffff8000000000) 8933 1.1 christos OP_74 OPE4_2 8934 1.1 christos "Conditional Media quad multiply and accumulate signed") 8935 1.1 christos 8936 1.1 christos (conditional-media-quad-multiply-acc cmqmachu UHI zext add h-acc40U ACC40Uk 8937 1.1 christos (const DI #xffffffffff) (const DI 0) 8938 1.1 christos OP_74 OPE4_3 8939 1.1 christos "Conditional media quad multiply and accumulate unsigned") 8940 1.1 christos 8941 1.1 christos (define-pmacro (media-quad-multiply-cross-acc-semantics 8942 1.1 christos cond mode conv addop rhw res max min) 8943 1.1 christos (if (c-call SI "@cpu@_check_acc_range" (index-of res)) 8944 1.1 christos (if (register-unaligned res 4) 8945 1.1 christos (c-call VOID "@cpu@_media_acc_not_aligned") 8946 1.1 christos (if (orif (register-unaligned FRintieven 2) 8947 1.1 christos (register-unaligned FRintjeven 2)) 8948 1.1 christos (c-call VOID "@cpu@_media_register_not_aligned") 8949 1.1 christos (if cond 8950 1.1 christos (sequence ((mode argihi) (mode argilo) 8951 1.1 christos (mode argjhi) (mode argjlo)) 8952 1.1 christos (extract-hilo FRintieven 0 FRintjeven 0 8953 1.1 christos argihi argilo argjhi argjlo) 8954 1.1 christos (media-multiply-acc-semantics conv argihi addop argjhi 8955 1.1 christos (nextreg rhw res 2) 8956 1.1 christos max min (msr-sie-acci-2)) 8957 1.1 christos (media-multiply-acc-semantics conv argilo addop argjlo 8958 1.1 christos (nextreg rhw res 3) 8959 1.1 christos max min (msr-sie-acci-3)) 8960 1.1 christos (extract-hilo FRintieven 1 FRintjeven 1 8961 1.1 christos argihi argilo argjhi argjlo) 8962 1.1 christos (media-multiply-acc-semantics conv argihi addop argjhi 8963 1.1 christos res 8964 1.1 christos max min (msr-sie-acci)) 8965 1.1 christos (media-multiply-acc-semantics conv argilo addop argjlo 8966 1.1 christos (nextreg rhw res 1) 8967 1.1 christos max min 8968 1.1 christos (msr-sie-acci-1))))))) 8969 1.1 christos ) 8970 1.1 christos 8971 1.1 christos (define-pmacro (media-quad-multiply-cross-acc 8972 1.1 christos name mode conv addop rhw res max min op ope comment) 8973 1.1 christos (dni name 8974 1.1 christos (comment) 8975 1.1 christos ((UNIT FMALL) (MACH fr400,fr450,fr550) (FR550-MAJOR M-4) 8976 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-4)) 8977 1.1 christos (.str name "$pack $FRintieven,$FRintjeven,$" res) 8978 1.1 christos (+ pack res op FRintieven ope FRintjeven) 8979 1.1 christos (media-quad-multiply-cross-acc-semantics 1 mode conv addop rhw res 8980 1.1 christos max min) 8981 1.1 christos ((fr400 (unit u-media-2-quad 8982 1.1 christos (in FRinti FRintieven) 8983 1.1 christos (in FRintj FRintjeven))) 8984 1.1 christos (fr450 (unit u-media-2-quad 8985 1.1 christos (in FRinti FRintieven) 8986 1.1 christos (in FRintj FRintjeven))) 8987 1.1 christos (fr550 (unit u-media-4-quad))) 8988 1.1 christos ) 8989 1.1 christos ) 8990 1.1 christos 8991 1.1 christos (media-quad-multiply-cross-acc mqxmachs HI ext add h-acc40S ACC40Sk 8992 1.1 christos (const DI #x7fffffffff) (const DI #xffffff8000000000) 8993 1.1 christos OP_78 OPE1_00 8994 1.1 christos "Media quad multiply and cross accumulate signed") 8995 1.1 christos 8996 1.1 christos (define-pmacro (media-quad-cross-multiply-cross-acc-semantics 8997 1.1 christos cond mode conv addop rhw res max min) 8998 1.1 christos (if (c-call SI "@cpu@_check_acc_range" (index-of res)) 8999 1.1 christos (if (register-unaligned res 4) 9000 1.1 christos (c-call VOID "@cpu@_media_acc_not_aligned") 9001 1.1 christos (if (orif (register-unaligned FRintieven 2) 9002 1.1 christos (register-unaligned FRintjeven 2)) 9003 1.1 christos (c-call VOID "@cpu@_media_register_not_aligned") 9004 1.1 christos (if cond 9005 1.1 christos (sequence ((mode argihi) (mode argilo) 9006 1.1 christos (mode argjhi) (mode argjlo)) 9007 1.1 christos (extract-hilo FRintieven 0 FRintjeven 0 9008 1.1 christos argihi argilo argjhi argjlo) 9009 1.1 christos (media-multiply-acc-semantics conv argihi addop argjlo 9010 1.1 christos (nextreg rhw res 2) 9011 1.1 christos max min (msr-sie-acci-2)) 9012 1.1 christos (media-multiply-acc-semantics conv argilo addop argjhi 9013 1.1 christos (nextreg rhw res 3) 9014 1.1 christos max min (msr-sie-acci-3)) 9015 1.1 christos (extract-hilo FRintieven 1 FRintjeven 1 9016 1.1 christos argihi argilo argjhi argjlo) 9017 1.1 christos (media-multiply-acc-semantics conv argihi addop argjlo 9018 1.1 christos res 9019 1.1 christos max min (msr-sie-acci)) 9020 1.1 christos (media-multiply-acc-semantics conv argilo addop argjhi 9021 1.1 christos (nextreg rhw res 1) 9022 1.1 christos max min 9023 1.1 christos (msr-sie-acci-1))))))) 9024 1.1 christos ) 9025 1.1 christos 9026 1.1 christos (define-pmacro (media-quad-cross-multiply-cross-acc 9027 1.1 christos name mode conv addop rhw res max min op ope comment) 9028 1.1 christos (dni name 9029 1.1 christos (comment) 9030 1.1 christos ((UNIT FMALL) (MACH fr400,fr450,fr550) (FR550-MAJOR M-4) 9031 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-4)) 9032 1.1 christos (.str name "$pack $FRintieven,$FRintjeven,$" res) 9033 1.1 christos (+ pack res op FRintieven ope FRintjeven) 9034 1.1 christos (media-quad-cross-multiply-cross-acc-semantics 1 mode conv addop rhw res 9035 1.1 christos max min) 9036 1.1 christos ((fr400 (unit u-media-2-quad 9037 1.1 christos (in FRinti FRintieven) 9038 1.1 christos (in FRintj FRintjeven))) 9039 1.1 christos (fr450 (unit u-media-2-quad 9040 1.1 christos (in FRinti FRintieven) 9041 1.1 christos (in FRintj FRintjeven))) 9042 1.1 christos (fr550 (unit u-media-4-quad))) 9043 1.1 christos ) 9044 1.1 christos ) 9045 1.1 christos 9046 1.1 christos (media-quad-cross-multiply-cross-acc mqxmacxhs HI ext add h-acc40S ACC40Sk 9047 1.1 christos (const DI #x7fffffffff) (const DI #xffffff8000000000) 9048 1.1 christos OP_78 OPE1_01 9049 1.1 christos "Media quad cross multiply and cross accumulate signed") 9050 1.1 christos 9051 1.1 christos (define-pmacro (media-quad-cross-multiply-acc-semantics 9052 1.1 christos cond mode conv addop rhw res max min) 9053 1.1 christos (if (c-call SI "@cpu@_check_acc_range" (index-of res)) 9054 1.1 christos (if (register-unaligned res 4) 9055 1.1 christos (c-call VOID "@cpu@_media_acc_not_aligned") 9056 1.1 christos (if (orif (register-unaligned FRintieven 2) 9057 1.1 christos (register-unaligned FRintjeven 2)) 9058 1.1 christos (c-call VOID "@cpu@_media_register_not_aligned") 9059 1.1 christos (if cond 9060 1.1 christos (sequence ((mode argihi) (mode argilo) 9061 1.1 christos (mode argjhi) (mode argjlo)) 9062 1.1 christos (extract-hilo FRintieven 0 FRintjeven 0 9063 1.1 christos argihi argilo argjhi argjlo) 9064 1.1 christos (media-multiply-acc-semantics conv argihi addop argjlo 9065 1.1 christos res 9066 1.1 christos max min (msr-sie-acci)) 9067 1.1 christos (media-multiply-acc-semantics conv argilo addop argjhi 9068 1.1 christos (nextreg rhw res 1) 9069 1.1 christos max min (msr-sie-acci-1)) 9070 1.1 christos (extract-hilo FRintieven 1 FRintjeven 1 9071 1.1 christos argihi argilo argjhi argjlo) 9072 1.1 christos (media-multiply-acc-semantics conv argihi addop argjlo 9073 1.1 christos (nextreg rhw res 2) 9074 1.1 christos max min (msr-sie-acci-2)) 9075 1.1 christos (media-multiply-acc-semantics conv argilo addop argjhi 9076 1.1 christos (nextreg rhw res 3) 9077 1.1 christos max min 9078 1.1 christos (msr-sie-acci-3))))))) 9079 1.1 christos ) 9080 1.1 christos 9081 1.1 christos (define-pmacro (media-quad-cross-multiply-acc 9082 1.1 christos name mode conv addop rhw res max min op ope comment) 9083 1.1 christos (dni name 9084 1.1 christos (comment) 9085 1.1 christos ((UNIT FMALL) (MACH fr400,fr450,fr550) (FR550-MAJOR M-4) 9086 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-4)) 9087 1.1 christos (.str name "$pack $FRintieven,$FRintjeven,$" res) 9088 1.1 christos (+ pack res op FRintieven ope FRintjeven) 9089 1.1 christos (media-quad-cross-multiply-acc-semantics 1 mode conv addop rhw res 9090 1.1 christos max min) 9091 1.1 christos ((fr400 (unit u-media-2-quad 9092 1.1 christos (in FRinti FRintieven) 9093 1.1 christos (in FRintj FRintjeven))) 9094 1.1 christos (fr450 (unit u-media-2-quad 9095 1.1 christos (in FRinti FRintieven) 9096 1.1 christos (in FRintj FRintjeven))) 9097 1.1 christos (fr550 (unit u-media-4-quad))) 9098 1.1 christos ) 9099 1.1 christos ) 9100 1.1 christos 9101 1.1 christos (media-quad-cross-multiply-acc mqmacxhs HI ext add h-acc40S ACC40Sk 9102 1.1 christos (const DI #x7fffffffff) (const DI #xffffff8000000000) 9103 1.1 christos OP_78 OPE1_02 9104 1.1 christos "Media quad cross multiply and accumulate signed") 9105 1.1 christos 9106 1.1 christos (define-pmacro (media-complex-semantics 9107 1.1 christos conv lhs1 rhs1 lhs2 rhs2 res max min sie) 9108 1.1 christos (sequence ((DI tmp1) (DI tmp2)) 9109 1.1 christos (media-multiply-semantics conv lhs1 rhs1 tmp1) 9110 1.1 christos (media-multiply-semantics conv lhs2 rhs2 tmp2) 9111 1.1 christos (set tmp1 (sub tmp1 tmp2)) 9112 1.1 christos (saturate-v tmp1 max min sie res)) 9113 1.1 christos ) 9114 1.1 christos 9115 1.1 christos (define-pmacro (media-complex-semantics-i 9116 1.1 christos conv lhs1 rhs1 lhs2 rhs2 res max min sie) 9117 1.1 christos (sequence ((DI tmp1) (DI tmp2)) 9118 1.1 christos (media-multiply-semantics conv lhs1 rhs1 tmp1) 9119 1.1 christos (media-multiply-semantics conv lhs2 rhs2 tmp2) 9120 1.1 christos (set tmp1 (add tmp1 tmp2)) 9121 1.1 christos (saturate-v tmp1 max min sie res)) 9122 1.1 christos ) 9123 1.1 christos 9124 1.1 christos (define-pmacro (media-dual-complex-semantics mode conv rhs1 rhs2 max min) 9125 1.1 christos (if (c-call SI "@cpu@_check_acc_range" (index-of ACC40Sk)) 9126 1.1 christos (sequence ((mode argihi) (mode argilo) (mode argjhi) (mode argjlo)) 9127 1.1 christos (extract-hilo FRinti 0 FRintj 0 argihi argilo argjhi argjlo) 9128 1.1 christos (media-complex-semantics conv argihi rhs1 argilo rhs2 ACC40Sk 9129 1.1 christos max min (msr-sie-acci)))) 9130 1.1 christos ) 9131 1.1 christos 9132 1.1 christos (define-pmacro (media-dual-complex-semantics-i mode conv rhs1 rhs2 max min) 9133 1.1 christos (if (c-call SI "@cpu@_check_acc_range" (index-of ACC40Sk)) 9134 1.1 christos (sequence ((mode argihi) (mode argilo) (mode argjhi) (mode argjlo)) 9135 1.1 christos (extract-hilo FRinti 0 FRintj 0 argihi argilo argjhi argjlo) 9136 1.1 christos (media-complex-semantics-i conv argihi rhs1 argilo rhs2 ACC40Sk 9137 1.1 christos max min (msr-sie-acci)))) 9138 1.1 christos ) 9139 1.1 christos 9140 1.1 christos (define-pmacro (media-dual-complex 9141 1.1 christos name mode conv rhs1 rhs2 max min op ope comment) 9142 1.1 christos (dni name 9143 1.1 christos (comment) 9144 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-4) (FR550-MAJOR M-4) 9145 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-3)) 9146 1.1 christos (.str name "$pack $FRinti,$FRintj,$ACC40Sk") 9147 1.1 christos (+ pack ACC40Sk op FRinti ope FRintj) 9148 1.1 christos (media-dual-complex-semantics mode conv rhs1 rhs2 max min) 9149 1.1 christos ((fr400 (unit u-media-2)) (fr450 (unit u-media-2)) 9150 1.1 christos (fr500 (unit u-media-dual-mul)) (fr550 (unit u-media-4))) 9151 1.1 christos ) 9152 1.1 christos ) 9153 1.1 christos 9154 1.1 christos (define-pmacro (media-dual-complex-i 9155 1.1 christos name mode conv rhs1 rhs2 max min op ope comment) 9156 1.1 christos (dni name 9157 1.1 christos (comment) 9158 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-4) (FR550-MAJOR M-4) 9159 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-3)) 9160 1.1 christos (.str name "$pack $FRinti,$FRintj,$ACC40Sk") 9161 1.1 christos (+ pack ACC40Sk op FRinti ope FRintj) 9162 1.1 christos (media-dual-complex-semantics-i mode conv rhs1 rhs2 max min) 9163 1.1 christos ((fr400 (unit u-media-2)) (fr450 (unit u-media-2)) 9164 1.1 christos (fr500 (unit u-media-dual-mul)) (fr550 (unit u-media-4))) 9165 1.1 christos ) 9166 1.1 christos ) 9167 1.1 christos 9168 1.1 christos (media-dual-complex mcpxrs HI ext argjhi argjlo 9169 1.1 christos (const DI #x7fffffffff) (const DI #xffffff8000000000) 9170 1.1 christos OP_7B OPE1_20 9171 1.1 christos "Media dual complex real signed with saturation") 9172 1.1 christos 9173 1.1 christos (media-dual-complex mcpxru UHI zext argjhi argjlo 9174 1.1 christos (const DI #xffffffffff) (const DI 0) 9175 1.1 christos OP_7B OPE1_21 9176 1.1 christos "Media dual complex real unsigned with saturation") 9177 1.1 christos 9178 1.1 christos (media-dual-complex-i mcpxis HI ext argjlo argjhi 9179 1.1 christos (const DI #x7fffffffff) (const DI #xffffff8000000000) 9180 1.1 christos OP_7B OPE1_22 9181 1.1 christos "Media dual complex imaginary signed with saturation") 9182 1.1 christos 9183 1.1 christos (media-dual-complex-i mcpxiu UHI zext argjlo argjhi 9184 1.1 christos (const DI #xffffffffff) (const DI 0) 9185 1.1 christos OP_7B OPE1_23 9186 1.1 christos "Media dual complex imaginary unsigned with saturation") 9187 1.1 christos 9188 1.1 christos (define-pmacro (conditional-media-dual-complex 9189 1.1 christos name mode conv rhs1 rhs2 max min op ope comment) 9190 1.1 christos (dni name 9191 1.1 christos (comment) 9192 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-4) (FR550-MAJOR M-4) 9193 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-3) CONDITIONAL) 9194 1.1 christos (.str name "$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond") 9195 1.1 christos (+ pack ACC40Sk op FRinti CCi cond ope FRintj) 9196 1.1 christos (if (eq CCi (or cond 2)) 9197 1.1 christos (media-dual-complex-semantics mode conv rhs1 rhs2 max min)) 9198 1.1 christos ((fr400 (unit u-media-2)) (fr450 (unit u-media-2)) 9199 1.1 christos (fr500 (unit u-media-dual-mul)) (fr550 (unit u-media-4))) 9200 1.1 christos ) 9201 1.1 christos ) 9202 1.1 christos 9203 1.1 christos (define-pmacro (conditional-media-dual-complex-i 9204 1.1 christos name mode conv rhs1 rhs2 max min op ope comment) 9205 1.1 christos (dni name 9206 1.1 christos (comment) 9207 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-4) (FR550-MAJOR M-4) 9208 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-3) CONDITIONAL) 9209 1.1 christos (.str name "$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond") 9210 1.1 christos (+ pack ACC40Sk op FRinti CCi cond ope FRintj) 9211 1.1 christos (if (eq CCi (or cond 2)) 9212 1.1 christos (media-dual-complex-semantics-i mode conv rhs1 rhs2 max min)) 9213 1.1 christos ((fr400 (unit u-media-2)) (fr450 (unit u-media-2)) 9214 1.1 christos (fr500 (unit u-media-dual-mul)) (fr550 (unit u-media-4))) 9215 1.1 christos ) 9216 1.1 christos ) 9217 1.1 christos 9218 1.1 christos (conditional-media-dual-complex cmcpxrs HI ext argjhi argjlo 9219 1.1 christos (const DI #x7fffffffff) (const DI #xffffff8000000000) 9220 1.1 christos OP_75 OPE4_0 9221 1.1 christos "Conditional Media dual complex real signed with saturation") 9222 1.1 christos 9223 1.1 christos (conditional-media-dual-complex cmcpxru UHI zext argjhi argjlo 9224 1.1 christos (const DI #xffffffffff) (const DI 0) 9225 1.1 christos OP_75 OPE4_1 9226 1.1 christos "Conditional Media dual complex real unsigned with saturation") 9227 1.1 christos 9228 1.1 christos (conditional-media-dual-complex-i cmcpxis HI ext argjlo argjhi 9229 1.1 christos (const DI #x7fffffffff) (const DI #xffffff8000000000) 9230 1.1 christos OP_75 OPE4_2 9231 1.1 christos "Conditional Media dual complex imaginary signed with saturation") 9232 1.1 christos 9233 1.1 christos (conditional-media-dual-complex-i cmcpxiu UHI zext argjlo argjhi 9234 1.1 christos (const DI #xffffffffff) (const DI 0) 9235 1.1 christos OP_75 OPE4_3 9236 1.1 christos "Conditional Media dual complex imaginary unsigned with saturation") 9237 1.1 christos 9238 1.1 christos (define-pmacro (media-quad-complex 9239 1.1 christos name mode conv rhs1 rhs2 max min op ope comment) 9240 1.1 christos (dni name 9241 1.1 christos (comment) 9242 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-4) (FR550-MAJOR M-4) 9243 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-4)) 9244 1.1 christos (.str name "$pack $FRintieven,$FRintjeven,$ACC40Sk") 9245 1.1 christos (+ pack ACC40Sk op FRintieven ope FRintjeven) 9246 1.1 christos (if (c-call SI "@cpu@_check_acc_range" (index-of ACC40Sk)) 9247 1.1 christos (if (register-unaligned ACC40Sk 2) 9248 1.1 christos (c-call VOID "@cpu@_media_acc_not_aligned") 9249 1.1 christos (if (orif (register-unaligned FRintieven 2) 9250 1.1 christos (register-unaligned FRintjeven 2)) 9251 1.1 christos (c-call VOID "@cpu@_media_register_not_aligned") 9252 1.1 christos (sequence ((mode argihi) (mode argilo) 9253 1.1 christos (mode argjhi) (mode argjlo)) 9254 1.1 christos (extract-hilo FRintieven 0 FRintjeven 0 9255 1.1 christos argihi argilo argjhi argjlo) 9256 1.1 christos (media-complex-semantics conv argihi rhs1 argilo rhs2 9257 1.1 christos ACC40Sk 9258 1.1 christos max min (msr-sie-acci)) 9259 1.1 christos (extract-hilo FRintieven 1 FRintjeven 1 9260 1.1 christos argihi argilo argjhi argjlo) 9261 1.1 christos (media-complex-semantics conv argihi rhs1 argilo rhs2 9262 1.1 christos (nextreg h-acc40S ACC40Sk 1) 9263 1.1 christos max min (msr-sie-acci-1)))))) 9264 1.1 christos ((fr400 (unit u-media-2-quad 9265 1.1 christos (in FRinti FRintieven) 9266 1.1 christos (in FRintj FRintjeven))) 9267 1.1 christos (fr450 (unit u-media-2-quad 9268 1.1 christos (in FRinti FRintieven) 9269 1.1 christos (in FRintj FRintjeven))) 9270 1.1 christos (fr500 (unit u-media-quad-complex 9271 1.1 christos (in FRinti FRintieven) 9272 1.1 christos (in FRintj FRintjeven))) (fr550 (unit u-media-4-quad))) 9273 1.1 christos ) 9274 1.1 christos ) 9275 1.1 christos 9276 1.1 christos (define-pmacro (media-quad-complex-i 9277 1.1 christos name mode conv rhs1 rhs2 max min op ope comment) 9278 1.1 christos (dni name 9279 1.1 christos (comment) 9280 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-4) (FR550-MAJOR M-4) 9281 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-4)) 9282 1.1 christos (.str name "$pack $FRintieven,$FRintjeven,$ACC40Sk") 9283 1.1 christos (+ pack ACC40Sk op FRintieven ope FRintjeven) 9284 1.1 christos (if (c-call SI "@cpu@_check_acc_range" (index-of ACC40Sk)) 9285 1.1 christos (if (register-unaligned ACC40Sk 2) 9286 1.1 christos (c-call VOID "@cpu@_media_acc_not_aligned") 9287 1.1 christos (if (orif (register-unaligned FRintieven 2) 9288 1.1 christos (register-unaligned FRintjeven 2)) 9289 1.1 christos (c-call VOID "@cpu@_media_register_not_aligned") 9290 1.1 christos (sequence ((mode argihi) (mode argilo) 9291 1.1 christos (mode argjhi) (mode argjlo)) 9292 1.1 christos (extract-hilo FRintieven 0 FRintjeven 0 9293 1.1 christos argihi argilo argjhi argjlo) 9294 1.1 christos (media-complex-semantics-i conv argihi rhs1 argilo rhs2 9295 1.1 christos ACC40Sk 9296 1.1 christos max min (msr-sie-acci)) 9297 1.1 christos (extract-hilo FRintieven 1 FRintjeven 1 9298 1.1 christos argihi argilo argjhi argjlo) 9299 1.1 christos (media-complex-semantics-i conv argihi rhs1 argilo rhs2 9300 1.1 christos (nextreg h-acc40S ACC40Sk 1) 9301 1.1 christos max min (msr-sie-acci-1)))))) 9302 1.1 christos ((fr400 (unit u-media-2-quad 9303 1.1 christos (in FRinti FRintieven) 9304 1.1 christos (in FRintj FRintjeven))) 9305 1.1 christos (fr450 (unit u-media-2-quad 9306 1.1 christos (in FRinti FRintieven) 9307 1.1 christos (in FRintj FRintjeven))) 9308 1.1 christos (fr500 (unit u-media-quad-complex 9309 1.1 christos (in FRinti FRintieven) 9310 1.1 christos (in FRintj FRintjeven))) (fr550 (unit u-media-4-quad))) 9311 1.1 christos ) 9312 1.1 christos ) 9313 1.1 christos 9314 1.1 christos (media-quad-complex mqcpxrs HI ext argjhi argjlo 9315 1.1 christos (const DI #x7fffffffff) (const DI #xffffff8000000000) 9316 1.1 christos OP_7B OPE1_24 9317 1.1 christos "Media quad complex real signed with saturation") 9318 1.1 christos 9319 1.1 christos (media-quad-complex mqcpxru UHI zext argjhi argjlo 9320 1.1 christos (const DI #xffffffffff) (const DI 0) 9321 1.1 christos OP_7B OPE1_25 9322 1.1 christos "Media quad complex real unsigned with saturation") 9323 1.1 christos 9324 1.1 christos (media-quad-complex-i mqcpxis HI ext argjlo argjhi 9325 1.1 christos (const DI #x7fffffffff) (const DI #xffffff8000000000) 9326 1.1 christos OP_7B OPE1_26 9327 1.1 christos "Media quad complex imaginary signed with saturation") 9328 1.1 christos 9329 1.1 christos (media-quad-complex-i mqcpxiu UHI zext argjlo argjhi 9330 1.1 christos (const DI #xffffffffff) (const DI 0) 9331 1.1 christos OP_7B OPE1_27 9332 1.1 christos "Media quad complex imaginary unsigned with saturation") 9333 1.1 christos 9334 1.1 christos (define-pmacro (media-pack src1 src2 targ offset) 9335 1.1 christos (sequence () 9336 1.1 christos (set (halfword hi targ offset) (halfword lo src1 offset)) 9337 1.1 christos (set (halfword lo targ offset) (halfword lo src2 offset))) 9338 1.1 christos ) 9339 1.1 christos 9340 1.1 christos (define-pmacro (media-expand-halfword-to-word-semantics cond) 9341 1.1 christos (if cond 9342 1.1 christos (sequence ((UHI tmp)) 9343 1.1 christos (if (and u6 1) 9344 1.1 christos (set tmp (halfword lo FRinti 0)) 9345 1.1 christos (set tmp (halfword hi FRinti 0))) 9346 1.1 christos (set (halfword hi FRintk 0) tmp) 9347 1.1 christos (set (halfword lo FRintk 0) tmp))) 9348 1.1 christos ) 9349 1.1 christos 9350 1.1 christos (dni mexpdhw 9351 1.1 christos "Media expand halfword to word" 9352 1.1 christos ((UNIT FM01) (FR500-MAJOR M-2) (FR550-MAJOR M-3) 9353 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-1)) 9354 1.1 christos "mexpdhw$pack $FRinti,$u6,$FRintk" 9355 1.1 christos (+ pack FRintk OP_7B FRinti OPE1_32 u6) 9356 1.1 christos (media-expand-halfword-to-word-semantics 1) 9357 1.1 christos ((fr400 (unit u-media-3)) (fr450 (unit u-media-3)) 9358 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media))) 9359 1.1 christos ) 9360 1.1 christos 9361 1.1 christos (dni cmexpdhw 9362 1.1 christos "Conditional media expand halfword to word" 9363 1.1 christos ((UNIT FM01) (FR500-MAJOR M-2) (FR550-MAJOR M-3) 9364 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-1) CONDITIONAL) 9365 1.1 christos "cmexpdhw$pack $FRinti,$u6,$FRintk,$CCi,$cond" 9366 1.1 christos (+ pack FRintk OP_76 FRinti CCi cond OPE4_2 u6) 9367 1.1 christos (media-expand-halfword-to-word-semantics (eq CCi (or cond 2))) 9368 1.1 christos ((fr400 (unit u-media-3)) (fr450 (unit u-media-3)) 9369 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media))) 9370 1.1 christos ) 9371 1.1 christos 9372 1.1 christos (define-pmacro (media-expand-halfword-to-double-semantics cond) 9373 1.1 christos (if (register-unaligned FRintkeven 2) 9374 1.1 christos (c-call VOID "@cpu@_media_register_not_aligned") 9375 1.1 christos (if cond 9376 1.1 christos (sequence ((UHI tmp)) 9377 1.1 christos ; a hack to get FRintkeven referenced for profiling 9378 1.1 christos (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven)) 9379 1.1 christos (if (and u6 1) 9380 1.1 christos (set tmp (halfword lo FRinti 0)) 9381 1.1 christos (set tmp (halfword hi FRinti 0))) 9382 1.1 christos (set (halfword hi FRintkeven 0) tmp) 9383 1.1 christos (set (halfword lo FRintkeven 0) tmp) 9384 1.1 christos (set (halfword hi FRintkeven 1) tmp) 9385 1.1 christos (set (halfword lo FRintkeven 1) tmp)))) 9386 1.1 christos ) 9387 1.1 christos 9388 1.1 christos (dni mexpdhd 9389 1.1 christos "Media expand halfword to double" 9390 1.1 christos ((UNIT FM01) (FR500-MAJOR M-2) (FR550-MAJOR M-3) 9391 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-2)) 9392 1.1 christos "mexpdhd$pack $FRinti,$u6,$FRintkeven" 9393 1.1 christos (+ pack FRintkeven OP_7B FRinti OPE1_33 u6) 9394 1.1 christos (media-expand-halfword-to-double-semantics 1) 9395 1.1 christos ((fr400 (unit u-media-dual-expand 9396 1.1 christos (out FRintk FRintkeven))) 9397 1.1 christos (fr450 (unit u-media-dual-expand 9398 1.1 christos (out FRintk FRintkeven))) 9399 1.1 christos (fr500 (unit u-media-dual-expand 9400 1.1 christos (out FRintk FRintkeven))) 9401 1.1 christos (fr550 (unit u-media-dual-expand))) 9402 1.1 christos ) 9403 1.1 christos 9404 1.1 christos (dni cmexpdhd 9405 1.1 christos "Conditional media expand halfword to double" 9406 1.1 christos ((UNIT FM01) (FR500-MAJOR M-2) (FR550-MAJOR M-3) 9407 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-2) CONDITIONAL) 9408 1.1 christos "cmexpdhd$pack $FRinti,$u6,$FRintkeven,$CCi,$cond" 9409 1.1 christos (+ pack FRintkeven OP_76 FRinti CCi cond OPE4_3 u6) 9410 1.1 christos (media-expand-halfword-to-double-semantics (eq CCi (or cond 2))) 9411 1.1 christos ((fr400 (unit u-media-dual-expand 9412 1.1 christos (out FRintk FRintkeven))) 9413 1.1 christos (fr450 (unit u-media-dual-expand 9414 1.1 christos (out FRintk FRintkeven))) 9415 1.1 christos (fr500 (unit u-media-dual-expand 9416 1.1 christos (out FRintk FRintkeven))) 9417 1.1 christos (fr550 (unit u-media-dual-expand))) 9418 1.1 christos ) 9419 1.1 christos 9420 1.1 christos (dni mpackh 9421 1.1 christos "Media halfword pack" 9422 1.1 christos ((UNIT FM01) (FR500-MAJOR M-2) (FR550-MAJOR M-3) 9423 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-1)) 9424 1.1 christos "mpackh$pack $FRinti,$FRintj,$FRintk" 9425 1.1 christos (+ pack FRintk OP_7B FRinti OPE1_34 FRintj) 9426 1.1 christos (media-pack FRinti FRintj FRintk 0) 9427 1.1 christos ((fr400 (unit u-media-3)) (fr450 (unit u-media-3)) 9428 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media))) 9429 1.1 christos ) 9430 1.1 christos 9431 1.1 christos (dni mdpackh 9432 1.1 christos "Media dual pack" 9433 1.1 christos ((UNIT FM01) (FR500-MAJOR M-5) (FR550-MAJOR M-3) 9434 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-2)) 9435 1.1 christos "mdpackh$pack $FRintieven,$FRintjeven,$FRintkeven" 9436 1.1 christos (+ pack FRintkeven OP_7B FRintieven OPE1_36 FRintjeven) 9437 1.1 christos (if (orif (register-unaligned FRintieven 2) 9438 1.1 christos (orif (register-unaligned FRintjeven 2) 9439 1.1 christos (register-unaligned FRintkeven 2))) 9440 1.1 christos (c-call VOID "@cpu@_media_register_not_aligned") 9441 1.1 christos (sequence () 9442 1.1 christos ; hack to get these referenced for profiling 9443 1.1 christos (set FRintieven (c-raw-call SI "frv_ref_SI" FRintieven)) 9444 1.1 christos (set FRintjeven (c-raw-call SI "frv_ref_SI" FRintjeven)) 9445 1.1 christos (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven)) 9446 1.1 christos (media-pack FRintieven FRintjeven FRintkeven 0) 9447 1.1 christos (media-pack FRintieven FRintjeven FRintkeven 1))) 9448 1.1 christos ((fr400 (unit u-media-3-quad 9449 1.1 christos (in FRinti FRintieven) 9450 1.1 christos (in FRintj FRintjeven) 9451 1.1 christos (out FRintk FRintkeven))) 9452 1.1 christos (fr450 (unit u-media-3-quad 9453 1.1 christos (in FRinti FRintieven) 9454 1.1 christos (in FRintj FRintjeven) 9455 1.1 christos (out FRintk FRintkeven))) 9456 1.1 christos (fr500 (unit u-media-quad-arith 9457 1.1 christos (in FRinti FRintieven) 9458 1.1 christos (in FRintj FRintjeven) 9459 1.1 christos (out FRintk FRintkeven))) 9460 1.1 christos (fr550 (unit u-media-quad))) 9461 1.1 christos ) 9462 1.1 christos 9463 1.1 christos (define-pmacro (media-unpack src soff targ toff) 9464 1.1 christos (sequence () 9465 1.1 christos (set (halfword hi targ toff) (halfword hi src soff)) 9466 1.1 christos (set (halfword lo targ toff) (halfword hi src soff)) 9467 1.1 christos (set (halfword hi targ (add toff 1)) (halfword lo src soff)) 9468 1.1 christos (set (halfword lo targ (add toff 1)) (halfword lo src soff))) 9469 1.1 christos ) 9470 1.1 christos 9471 1.1 christos (dni munpackh 9472 1.1 christos "Media halfword unpack" 9473 1.1 christos ((UNIT FM01) (FR500-MAJOR M-2) (FR550-MAJOR M-3) 9474 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-2)) 9475 1.1 christos "munpackh$pack $FRinti,$FRintkeven" 9476 1.1 christos (+ pack FRintkeven OP_7B FRinti OPE1_35 (FRj-null)) 9477 1.1 christos (if (register-unaligned FRintkeven 2) 9478 1.1 christos (c-call VOID "@cpu@_media_register_not_aligned") 9479 1.1 christos (sequence () 9480 1.1 christos ; hack to get these referenced for profiling 9481 1.1 christos (set FRinti (c-raw-call SI "frv_ref_SI" FRinti)) 9482 1.1 christos (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven)) 9483 1.1 christos (media-unpack FRinti 0 FRintkeven 0))) 9484 1.1 christos ((fr400 (unit u-media-dual-expand 9485 1.1 christos (out FRintk FRintkeven))) 9486 1.1 christos (fr450 (unit u-media-dual-expand 9487 1.1 christos (out FRintk FRintkeven))) 9488 1.1 christos (fr500 (unit u-media-dual-expand 9489 1.1 christos (out FRintk FRintkeven))) 9490 1.1 christos (fr550 (unit u-media-dual-expand))) 9491 1.1 christos ) 9492 1.1 christos 9493 1.1 christos (dni mdunpackh 9494 1.1 christos "Media dual unpack" 9495 1.1 christos ((UNIT FM01) (FR500-MAJOR M-7) (MACH simple,tomcat,frv)) 9496 1.1 christos "mdunpackh$pack $FRintieven,$FRintk" 9497 1.1 christos (+ pack FRintk OP_7B FRintieven OPE1_37 (FRj-null)) 9498 1.1 christos (if (orif (register-unaligned FRintieven 2) (register-unaligned FRintk 4)) 9499 1.1 christos (c-call VOID "@cpu@_media_register_not_aligned") 9500 1.1 christos (sequence () 9501 1.1 christos ; hack to get these referenced for profiling 9502 1.1 christos (set FRintieven (c-raw-call SI "frv_ref_SI" FRintieven)) 9503 1.1 christos (set FRintk (c-raw-call SI "frv_ref_SI" FRintk)) 9504 1.1 christos (media-unpack FRintieven 0 FRintk 0) 9505 1.1 christos (media-unpack FRintieven 1 FRintk 2))) 9506 1.1 christos ((fr500 (unit u-media-dual-unpack 9507 1.1 christos (in FRinti FRintieven)))) 9508 1.1 christos ) 9509 1.1 christos 9510 1.1 christos (define-pmacro (ubyte num arg offset) 9511 1.1 christos (reg (.sym h-fr_ num) (add (index-of arg) offset))) 9512 1.1 christos 9513 1.1 christos (define-pmacro (mbtoh-semantics cond) 9514 1.1 christos (if (register-unaligned FRintkeven 2) 9515 1.1 christos (c-call VOID "@cpu@_media_register_not_aligned") 9516 1.1 christos (if cond 9517 1.1 christos (sequence () 9518 1.1 christos (set (halfword hi FRintkeven 0) (ubyte 3 FRintj 0)) 9519 1.1 christos (set (halfword lo FRintkeven 0) (ubyte 2 FRintj 0)) 9520 1.1 christos (set (halfword hi FRintkeven 1) (ubyte 1 FRintj 0)) 9521 1.1 christos (set (halfword lo FRintkeven 1) (ubyte 0 FRintj 0))))) 9522 1.1 christos ) 9523 1.1 christos 9524 1.1 christos (dni mbtoh 9525 1.1 christos "Media convert byte to halfword" 9526 1.1 christos ((UNIT FM01) (FR500-MAJOR M-2) (FR550-MAJOR M-3) 9527 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-2)) 9528 1.1 christos "mbtoh$pack $FRintj,$FRintkeven" 9529 1.1 christos (+ pack FRintkeven OP_7B (FRi-null) OPE1_38 FRintj) 9530 1.1 christos (sequence () 9531 1.1 christos ; hack to get these referenced for profiling 9532 1.1 christos (set FRintj (c-raw-call SI "frv_ref_SI" FRintj)) 9533 1.1 christos (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven)) 9534 1.1 christos (mbtoh-semantics 1)) 9535 1.1 christos ((fr400 (unit u-media-dual-expand 9536 1.1 christos (out FRintk FRintkeven))) 9537 1.1 christos (fr450 (unit u-media-dual-expand 9538 1.1 christos (out FRintk FRintkeven))) 9539 1.1 christos (fr500 (unit u-media-dual-btoh 9540 1.1 christos (out FRintk FRintkeven))) 9541 1.1 christos (fr550 (unit u-media-dual-expand))) 9542 1.1 christos ) 9543 1.1 christos 9544 1.1 christos (dni cmbtoh 9545 1.1 christos "Conditional media convert byte to halfword" 9546 1.1 christos ((UNIT FM01) (FR500-MAJOR M-2) (FR550-MAJOR M-3) 9547 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-2) CONDITIONAL) 9548 1.1 christos "cmbtoh$pack $FRintj,$FRintkeven,$CCi,$cond" 9549 1.1 christos (+ pack FRintkeven OP_77 (FRi-null) CCi cond OPE4_0 FRintj) 9550 1.1 christos (sequence () 9551 1.1 christos ; hack to get these referenced for profiling 9552 1.1 christos (set FRintj (c-raw-call SI "frv_ref_SI" FRintj)) 9553 1.1 christos (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven)) 9554 1.1 christos (mbtoh-semantics (eq CCi (or cond 2)))) 9555 1.1 christos ((fr400 (unit u-media-dual-expand 9556 1.1 christos (out FRintk FRintkeven))) 9557 1.1 christos (fr450 (unit u-media-dual-expand 9558 1.1 christos (out FRintk FRintkeven))) 9559 1.1 christos (fr500 (unit u-media-dual-btoh 9560 1.1 christos (out FRintk FRintkeven))) 9561 1.1 christos (fr550 (unit u-media-dual-expand 9562 1.1 christos (in FRinti FRintj)))) 9563 1.1 christos ) 9564 1.1 christos 9565 1.1 christos (define-pmacro (mhtob-semantics cond) 9566 1.1 christos (if (register-unaligned FRintjeven 2) 9567 1.1 christos (c-call VOID "@cpu@_media_register_not_aligned") 9568 1.1 christos (if cond 9569 1.1 christos (sequence () 9570 1.1 christos (set (ubyte 3 FRintk 0) (halfword hi FRintjeven 0)) 9571 1.1 christos (set (ubyte 2 FRintk 0) (halfword lo FRintjeven 0)) 9572 1.1 christos (set (ubyte 1 FRintk 0) (halfword hi FRintjeven 1)) 9573 1.1 christos (set (ubyte 0 FRintk 0) (halfword lo FRintjeven 1))))) 9574 1.1 christos ) 9575 1.1 christos 9576 1.1 christos (dni mhtob 9577 1.1 christos "Media convert halfword to byte" 9578 1.1 christos ((UNIT FM01) (FR500-MAJOR M-2) (FR550-MAJOR M-3) 9579 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-2)) 9580 1.1 christos "mhtob$pack $FRintjeven,$FRintk" 9581 1.1 christos (+ pack FRintk OP_7B (FRi-null) OPE1_39 FRintjeven) 9582 1.1 christos (sequence () 9583 1.1 christos ; hack to get these referenced for profiling 9584 1.1 christos (set FRintjeven (c-raw-call SI "frv_ref_SI" FRintjeven)) 9585 1.1 christos (set FRintk (c-raw-call SI "frv_ref_SI" FRintk)) 9586 1.1 christos (mhtob-semantics 1)) 9587 1.1 christos ((fr400 (unit u-media-dual-htob 9588 1.1 christos (in FRintj FRintjeven))) 9589 1.1 christos (fr450 (unit u-media-dual-htob 9590 1.1 christos (in FRintj FRintjeven))) 9591 1.1 christos (fr500 (unit u-media-dual-htob 9592 1.1 christos (in FRintj FRintjeven))) 9593 1.1 christos (fr550 (unit u-media-3-dual 9594 1.1 christos (in FRinti FRintjeven)))) 9595 1.1 christos ) 9596 1.1 christos 9597 1.1 christos (dni cmhtob 9598 1.1 christos "Conditional media convert halfword to byte" 9599 1.1 christos ((UNIT FM01) (FR500-MAJOR M-2) (FR550-MAJOR M-3) 9600 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-2) CONDITIONAL) 9601 1.1 christos "cmhtob$pack $FRintjeven,$FRintk,$CCi,$cond" 9602 1.1 christos (+ pack FRintk OP_77 (FRi-null) CCi cond OPE4_1 FRintjeven) 9603 1.1 christos (sequence () 9604 1.1 christos ; hack to get these referenced for profiling 9605 1.1 christos (set FRintjeven (c-raw-call SI "frv_ref_SI" FRintjeven)) 9606 1.1 christos (set FRintk (c-raw-call SI "frv_ref_SI" FRintk)) 9607 1.1 christos (mhtob-semantics (eq CCi (or cond 2)))) 9608 1.1 christos ((fr400 (unit u-media-dual-htob 9609 1.1 christos (in FRintj FRintjeven))) 9610 1.1 christos (fr450 (unit u-media-dual-htob 9611 1.1 christos (in FRintj FRintjeven))) 9612 1.1 christos (fr500 (unit u-media-dual-htob 9613 1.1 christos (in FRintj FRintjeven))) 9614 1.1 christos (fr550 (unit u-media-3-dual 9615 1.1 christos (in FRinti FRintjeven)))) 9616 1.1 christos ) 9617 1.1 christos 9618 1.1 christos (define-pmacro (mbtohe-semantics cond) 9619 1.1 christos (if (register-unaligned FRintk 4) 9620 1.1 christos (c-call VOID "@cpu@_media_register_not_aligned") 9621 1.1 christos (if cond 9622 1.1 christos (sequence () 9623 1.1 christos (set (halfword hi FRintk 0) (ubyte 3 FRintj 0)) 9624 1.1 christos (set (halfword lo FRintk 0) (ubyte 3 FRintj 0)) 9625 1.1 christos (set (halfword hi FRintk 1) (ubyte 2 FRintj 0)) 9626 1.1 christos (set (halfword lo FRintk 1) (ubyte 2 FRintj 0)) 9627 1.1 christos (set (halfword hi FRintk 2) (ubyte 1 FRintj 0)) 9628 1.1 christos (set (halfword lo FRintk 2) (ubyte 1 FRintj 0)) 9629 1.1 christos (set (halfword hi FRintk 3) (ubyte 0 FRintj 0)) 9630 1.1 christos (set (halfword lo FRintk 3) (ubyte 0 FRintj 0))))) 9631 1.1 christos ) 9632 1.1 christos 9633 1.1 christos (dni mbtohe 9634 1.1 christos "Media convert byte to halfword extended" 9635 1.1 christos ((UNIT FM01) (FR500-MAJOR M-7) (MACH simple,tomcat,frv)) 9636 1.1 christos "mbtohe$pack $FRintj,$FRintk" 9637 1.1 christos (+ pack FRintk OP_7B (FRi-null) OPE1_3A FRintj) 9638 1.1 christos (sequence () 9639 1.1 christos ; hack to get these referenced for profiling 9640 1.1 christos (set FRintj (c-raw-call SI "frv_ref_SI" FRintj)) 9641 1.1 christos (set FRintk (c-raw-call SI "frv_ref_SI" FRintk)) 9642 1.1 christos (mbtohe-semantics 1)) 9643 1.1 christos ((fr500 (unit u-media-dual-btohe))) 9644 1.1 christos ) 9645 1.1 christos 9646 1.1 christos (dni cmbtohe 9647 1.1 christos "Conditional media convert byte to halfword extended" 9648 1.1 christos ((UNIT FM01) (FR500-MAJOR M-7) CONDITIONAL (MACH simple,tomcat,frv)) 9649 1.1 christos "cmbtohe$pack $FRintj,$FRintk,$CCi,$cond" 9650 1.1 christos (+ pack FRintk OP_77 (FRi-null) CCi cond OPE4_2 FRintj) 9651 1.1 christos (sequence () 9652 1.1 christos ; hack to get these referenced for profiling 9653 1.1 christos (set FRintj (c-raw-call SI "frv_ref_SI" FRintj)) 9654 1.1 christos (set FRintk (c-raw-call SI "frv_ref_SI" FRintk)) 9655 1.1 christos (mbtohe-semantics (eq CCi (or cond 2)))) 9656 1.1 christos ((fr500 (unit u-media-dual-btohe))) 9657 1.1 christos ) 9658 1.1 christos 9659 1.1 christos ; Media NOP 9660 1.1 christos ; A special case of mclracc 9661 1.1 christos (dni mnop "Media nop" 9662 1.1 christos ((UNIT FMALL) (FR500-MAJOR M-1) (FR550-MAJOR M-1) 9663 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-1)) 9664 1.1 christos "mnop$pack" 9665 1.1 christos (+ pack (f-ACC40Sk 63) OP_7B (f-A 1) (misc-null-10) OPE1_3B (FRj-null)) 9666 1.1 christos (nop) 9667 1.1 christos () 9668 1.1 christos ) 9669 1.1 christos 9670 1.1 christos ; mclracc with #A==0 9671 1.1 christos (dni mclracc-0 9672 1.1 christos "Media clear accumulator(s)" 9673 1.1 christos ((UNIT FM01) (FR500-MAJOR M-3) (FR550-MAJOR M-3) 9674 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-3)) 9675 1.1 christos "mclracc$pack $ACC40Sk,$A0" 9676 1.1 christos (+ pack ACC40Sk OP_7B (f-A 0) (misc-null-10) OPE1_3B (FRj-null)) 9677 1.1 christos (c-call VOID "@cpu@_clear_accumulators" (index-of ACC40Sk) 0) 9678 1.1 christos ((fr400 (unit u-media-4)) (fr450 (unit u-media-4)) 9679 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media-3-mclracc))) 9680 1.1 christos ) 9681 1.1 christos 9682 1.1 christos ; mclracc with #A==1 9683 1.1 christos (dni mclracc-1 9684 1.1 christos "Media clear accumulator(s)" 9685 1.1 christos ((UNIT MCLRACC-1) (FR500-MAJOR M-6) (FR550-MAJOR M-3) 9686 1.1 christos (FR400-MAJOR M-2) (FR450-MAJOR M-4)) 9687 1.1 christos "mclracc$pack $ACC40Sk,$A1" 9688 1.1 christos (+ pack ACC40Sk OP_7B (f-A 1) (misc-null-10) OPE1_3B (FRj-null)) 9689 1.1 christos (c-call VOID "@cpu@_clear_accumulators" (index-of ACC40Sk) 1) 9690 1.1 christos ((fr400 (unit u-media-4)) (fr450 (unit u-media-4-mclracca)) 9691 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media-3-mclracc))) 9692 1.1 christos ) 9693 1.1 christos 9694 1.1 christos (dni mrdacc 9695 1.1 christos "Media read accumulator" 9696 1.1 christos ((UNIT FM01) (FR500-MAJOR M-2) (FR550-MAJOR M-3) 9697 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-5)) 9698 1.1 christos "mrdacc$pack $ACC40Si,$FRintk" 9699 1.1 christos (+ pack FRintk OP_7B ACC40Si OPE1_3C (FRj-null)) 9700 1.1 christos (set FRintk ACC40Si) 9701 1.1 christos ((fr400 (unit u-media-4)) (fr450 (unit u-media-4)) 9702 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media-3-acc))) 9703 1.1 christos ) 9704 1.1 christos 9705 1.1 christos (dni mrdaccg 9706 1.1 christos "Media read accumulator guard" 9707 1.1 christos ((UNIT FM01) (FR500-MAJOR M-2) (FR550-MAJOR M-3) 9708 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-5)) 9709 1.1 christos "mrdaccg$pack $ACCGi,$FRintk" 9710 1.1 christos (+ pack FRintk OP_7B ACCGi OPE1_3E (FRj-null)) 9711 1.1 christos (set FRintk ACCGi) 9712 1.1 christos ((fr400 (unit u-media-4-accg)) (fr450 (unit u-media-4-accg)) 9713 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media-3-acc (in ACC40Si ACCGi)))) 9714 1.1 christos ) 9715 1.1 christos 9716 1.1 christos (dni mwtacc 9717 1.1 christos "Media write accumulator" 9718 1.1 christos ((UNIT FM01) (FR500-MAJOR M-3) (FR550-MAJOR M-3) 9719 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-3)) 9720 1.1 christos "mwtacc$pack $FRinti,$ACC40Sk" 9721 1.1 christos (+ pack ACC40Sk OP_7B FRinti OPE1_3D (FRj-null)) 9722 1.1 christos (set ACC40Sk (or (and ACC40Sk (const DI #xffffffff00000000)) 9723 1.1 christos FRinti)) 9724 1.1 christos ((fr400 (unit u-media-4)) (fr450 (unit u-media-4)) 9725 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media-3-wtacc))) 9726 1.1 christos ) 9727 1.1 christos 9728 1.1 christos (dni mwtaccg 9729 1.1 christos "Media write accumulator guard" 9730 1.1 christos ((UNIT FM01) (FR500-MAJOR M-3) (FR550-MAJOR M-3) 9731 1.1 christos (FR400-MAJOR M-1) (FR450-MAJOR M-3)) 9732 1.1 christos "mwtaccg$pack $FRinti,$ACCGk" 9733 1.1 christos (+ pack ACCGk OP_7B FRinti OPE1_3F (FRj-null)) 9734 1.1 christos (sequence () 9735 1.1 christos ; hack to get these referenced for profiling 9736 1.1 christos (c-raw-call VOID "frv_ref_SI" ACCGk) 9737 1.1 christos (set ACCGk FRinti)) 9738 1.1 christos ((fr400 (unit u-media-4-accg)) (fr450 (unit u-media-4-accg)) 9739 1.1 christos (fr500 (unit u-media)) (fr550 (unit u-media-3-wtacc (in ACC40Sk ACCGk)))) 9740 1.1 christos ) 9741 1.1 christos 9742 1.1 christos (define-pmacro (media-cop num op) 9743 1.1 christos (dni (.sym mcop num) 9744 1.1 christos "Media custom instruction" 9745 1.1 christos ((UNIT FM01) (FR500-MAJOR M-1) (MACH frv)) 9746 1.1 christos (.str "mcop" num "$pack $FRi,$FRj,$FRk") 9747 1.1 christos (+ pack FRk op FRi OPE1_00 FRj) 9748 1.1 christos (c-call VOID "@cpu@_media_cop" num) 9749 1.1 christos () 9750 1.1 christos ) 9751 1.1 christos ) 9752 1.1 christos 9753 1.1 christos (media-cop 1 OP_7C) 9754 1.1 christos (media-cop 2 OP_7D) 9755 1.1 christos 9756 1.1 christos ; nop 9757 1.1 christos ; A nop is defined to be a "ori gr0,0,gr0" 9758 1.1 christos ; This needn't be a macro-insn, but making it one greatly simplifies decode.c 9759 1.1 christos ; On the other hand spending a little time in the decoder is often worth it. 9760 1.1 christos ; 9761 1.1 christos (dnmi nop "nop" 9762 1.1 christos ((UNIT IALL) (FR500-MAJOR I-1) (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 9763 1.1 christos "nop$pack" 9764 1.1 christos (emit ori pack (GRi 0) (s12 0) (GRk 0)) 9765 1.1 christos ) 9766 1.1 christos 9767 1.1 christos ; Floating point NOP 9768 1.1 christos (dni fnop 9769 1.1 christos "Floating point nop" 9770 1.1 christos ((UNIT FMALL) (FR500-MAJOR F-8) (FR550-MAJOR F-1) (MACH simple,tomcat,fr500,fr550,frv)) 9771 1.1 christos "fnop$pack" 9772 1.1 christos (+ pack (rd-null) OP_79 (FRi-null) OPE1_0D (FRj-null)) 9773 1.1 christos (nop) 9774 1.1 christos () 9775 1.1 christos ) 9776 1.1 christos 9777 1.1 christos ; A return instruction 9778 1.1 christos (dnmi ret "return" 9779 1.1 christos (NO-DIS (UNIT B01) (FR500-MAJOR B-3) 9780 1.1 christos (FR400-MAJOR B-3) (FR450-MAJOR B-3)) 9781 1.1 christos "ret$pack" 9782 1.1 christos (emit bralr pack (hint_taken 2)) 9783 1.1 christos ) 9784 1.1 christos 9785 1.1 christos (dnmi cmp "compare" 9786 1.1 christos (NO-DIS (UNIT IALL) (FR500-MAJOR I-1) 9787 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 9788 1.1 christos "cmp$pack $GRi,$GRj,$ICCi_1" 9789 1.1 christos (emit subcc pack GRi GRj (GRk 0) ICCi_1) 9790 1.1 christos ) 9791 1.1 christos 9792 1.1 christos (dnmi cmpi "compare immediate" 9793 1.1 christos (NO-DIS (UNIT IALL) (FR500-MAJOR I-1) 9794 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 9795 1.1 christos "cmpi$pack $GRi,$s10,$ICCi_1" 9796 1.1 christos (emit subicc pack GRi s10 (GRk 0) ICCi_1) 9797 1.1 christos ) 9798 1.1 christos 9799 1.1 christos (dnmi ccmp "conditional compare" 9800 1.1 christos (NO-DIS (UNIT IALL) (FR500-MAJOR I-1) 9801 1.1 christos (FR400-MAJOR I-1) (FR450-MAJOR I-1) CONDITIONAL) 9802 1.1 christos "ccmp$pack $GRi,$GRj,$CCi,$cond" 9803 1.1 christos (emit csubcc pack GRi GRj (GRk 0) CCi cond) 9804 1.1 christos ) 9805 9806 (dnmi mov "move" 9807 (NO-DIS (UNIT IALL) (FR500-MAJOR I-1) 9808 (FR400-MAJOR I-1) (FR450-MAJOR I-1)) 9809 "mov$pack $GRi,$GRk" 9810 (emit ori pack GRi (s12 0) GRk) 9811 ) 9812 9813 (dnmi cmov "conditional move" 9814 (NO-DIS (UNIT IALL) (FR500-MAJOR I-1) 9815 (FR400-MAJOR I-1) (FR450-MAJOR I-1) CONDITIONAL) 9816 "cmov$pack $GRi,$GRk,$CCi,$cond" 9817 (emit cor pack GRi (GRj 0) GRk CCi cond) 9818 ) 9819