Changeset 13413
 Timestamp:
 Jan 28, 2010, 4:09:51 AM (10 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/source/level0/X86/x86array.lisp
r13067 r13413 231 231 232 232 233 234 (defx86lapfunction %booleclr ((idx 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 235 (movq (@ idx (% rsp)) (% temp0)) 236 (movq ($ 0) (@ x8664::miscdataoffset (% dest) (% temp0))) 237 (singlevaluereturn 3)) 238 239 (defx86lapfunction %booleset ((idx 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 240 (movq (@ idx (% rsp)) (% temp0)) 241 (movq ($ 1) (@ x8664::miscdataoffset (% dest) (% temp0))) 242 (singlevaluereturn 3)) 243 244 (defx86lapfunction %boole1 ((idx 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 245 (movq (@ idx (% rsp)) (% temp0)) 246 (movq (@ x8664::miscdataoffset (% b0) (% temp0)) (% imm0)) 247 (movq (% imm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 248 (singlevaluereturn 3)) 249 250 (defx86lapfunction %boole2 ((idx 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 251 (movq (@ idx (% rsp)) (% temp0)) 252 (movq (@ x8664::miscdataoffset (% b1) (% temp0)) (% imm0)) 253 (movq (% imm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 254 (singlevaluereturn 3)) 255 256 (defx86lapfunction %boolec1 ((idx 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 257 (movq (@ idx (% rsp)) (% temp0)) 258 (movq (@ x8664::miscdataoffset (% b0) (% temp0)) (% imm0)) 259 (notq (% imm0)) 260 (movq (% imm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 261 (singlevaluereturn 3)) 262 263 (defx86lapfunction %boolec2 ((idx 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 264 (movq (@ idx (% rsp)) (% temp0)) 265 (movq (@ x8664::miscdataoffset (% b1) (% temp0)) (% imm0)) 266 (notq (% imm0)) 267 (movq (% imm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 268 (singlevaluereturn 3)) 269 270 (defx86lapfunction %booleand ((idx 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 271 (movq (@ idx (% rsp)) (% temp0)) 272 (movq (@ x8664::miscdataoffset (% b0) (% temp0)) (% imm0)) 273 (andq (@ x8664::miscdataoffset (% b1) (% temp0)) (% imm0)) 274 (movq (% imm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 275 (singlevaluereturn 3)) 276 277 (defx86lapfunction %booleior ((idx 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 278 (movq (@ idx (% rsp)) (% temp0)) 279 (movq (@ x8664::miscdataoffset (% b0) (% temp0)) (% imm0)) 280 (orq (@ x8664::miscdataoffset (% b1) (% temp0)) (% imm0)) 281 (movq (% imm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 282 (singlevaluereturn 3)) 283 284 (defx86lapfunction %boolexor ((idx 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 285 (movq (@ idx (% rsp)) (% temp0)) 286 (movq (@ x8664::miscdataoffset (% b0) (% temp0)) (% imm0)) 287 (xorq (@ x8664::miscdataoffset (% b1) (% temp0)) (% imm0)) 288 (movq (% imm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 289 (singlevaluereturn 3)) 290 291 (defx86lapfunction %booleeqv ((idx 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 292 (movq (@ idx (% rsp)) (% temp0)) 293 (movq (@ x8664::miscdataoffset (% b0) (% temp0)) (% imm0)) 294 (xorq (@ x8664::miscdataoffset (% b1) (% temp0)) (% imm0)) 295 (notq (% imm0)) 296 (movq (% imm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 297 (singlevaluereturn 3)) 298 299 (defx86lapfunction %boolenand ((idx 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 300 (movq (@ idx (% rsp)) (% temp0)) 301 (movq (@ x8664::miscdataoffset (% b0) (% temp0)) (% imm0)) 302 (andq (@ x8664::miscdataoffset (% b1) (% temp0)) (% imm0)) 303 (notq (% imm0)) 304 (movq (% imm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 305 (singlevaluereturn 3)) 306 307 (defx86lapfunction %boolenor ((idx 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 308 (movq (@ idx (% rsp)) (% temp0)) 309 (movq (@ x8664::miscdataoffset (% b0) (% temp0)) (% imm0)) 310 (orq (@ x8664::miscdataoffset (% b1) (% temp0)) (% imm0)) 311 (notq (% imm0)) 312 (movq (% imm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 313 (singlevaluereturn 3)) 314 315 (defx86lapfunction %booleandc1 ((idx 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 316 (movq (@ idx (% rsp)) (% temp0)) 317 (movq (@ x8664::miscdataoffset (% b0) (% temp0)) (% imm0)) 318 (notq (% imm0)) 319 (andq (@ x8664::miscdataoffset (% b1) (% temp0)) (% imm0)) 320 (movq (% imm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 321 (singlevaluereturn 3)) 322 323 (defx86lapfunction %booleandc2 ((idx 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 324 (movq (@ idx (% rsp)) (% temp0)) 325 (movq (@ x8664::miscdataoffset (% b1) (% temp0)) (% imm0)) 326 (notq (% imm0)) 327 (andq (@ x8664::miscdataoffset (% b0) (% temp0)) (% imm0)) 328 (movq (% imm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 329 (singlevaluereturn 3)) 330 331 (defx86lapfunction %booleorc1 ((idx 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 332 (movq (@ idx (% rsp)) (% temp0)) 333 (movq (@ x8664::miscdataoffset (% b0) (% temp0)) (% imm0)) 334 (notq (% imm0)) 335 (orq (@ x8664::miscdataoffset (% b1) (% temp0)) (% imm0)) 336 (movq (% imm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 337 (singlevaluereturn 3)) 338 339 (defx86lapfunction %booleorc2 ((idx 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 340 (movq (@ idx (% rsp)) (% temp0)) 341 (movq (@ x8664::miscdataoffset (% b1) (% temp0)) (% imm0)) 342 (notq (% imm0)) 343 (orq (@ x8664::miscdataoffset (% b0) (% temp0)) (% imm0)) 344 (movq (% imm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 233 ;;; In each of these "simple BOOLE functions", the LEN argument 234 ;;; describes the size of the bit vectors in whole or partial 235 ;;; nativesized words. The 0th word (and, if the number of 236 ;;; words is even, the last word) are not aligned on 16byte 237 ;;; boundaries; any intervening pairs of words are aligned on 238 ;;; 16byte boundaries, and we can use aligned SSE2 instructions 239 ;;; to process these bits 128 at a time. 240 241 (defx86lapfunction %booleclr ((len 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 242 (movq (@ len (% rsp)) (% temp0)) 243 (orl ($ 1) (%l temp0)) 244 (pxor (% xmm0) (% xmm0)) 245 (jmp @test) 246 @loop 247 (movaps (% xmm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 248 @test 249 (subq ($ '2) (% temp0)) 250 (jg @loop) 251 (movq ($ 0) (@ x8664::miscdataoffset (% dest))) 252 (singlevaluereturn 3)) 253 254 (defx86lapfunction %booleset ((len 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 255 (movq (@ len (% rsp)) (% temp0)) 256 (orl ($ '1) (%l temp0)) 257 (pcmpeqb (% xmm0) (% xmm0)) 258 (jmp @test) 259 @loop 260 (movaps (% xmm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 261 @test 262 (subq ($ '2) (% temp0)) 263 (jg @loop) 264 (movq ($ 1) (@ x8664::miscdataoffset (% dest))) 265 (singlevaluereturn 3) 266 (:align 4)) 267 268 (defx86lapfunction %boole1 ((len 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 269 (movq (@ len (% rsp)) (% temp0)) 270 (orl ($ '1) (%l temp0)) 271 (jmp @test) 272 @loop 273 (movaps (@ x8664::miscdataoffset (% b0) (% temp0)) (% xmm0)) 274 (movaps (% xmm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 275 @test 276 (subq ($ '2) (% temp0)) 277 (jg @loop) 278 (movq (@ x8664::miscdataoffset (% b0)) (% imm0)) 279 (movq (% imm0) (@ x8664::miscdataoffset (% dest))) 280 (singlevaluereturn 3)) 281 282 (defx86lapfunction %boole2 ((len 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 283 (movq (@ len (% rsp)) (% temp0)) 284 (orl ($ '1) (%l temp0)) 285 (jmp @test) 286 @loop 287 (movaps (@ x8664::miscdataoffset (% b1) (% temp0)) (% xmm0)) 288 (movaps (% xmm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 289 @test 290 (subq ($ '2) (% temp0)) 291 (jg @loop) 292 (movq (@ x8664::miscdataoffset (% b1)) (% imm0)) 293 (movq (% imm0) (@ x8664::miscdataoffset (% dest))) 294 (singlevaluereturn 3)) 295 296 (defx86lapfunction %boolec1 ((len 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 297 (movq (@ len (% rsp)) (% temp0)) 298 (pcmpeqb (% xmm1) (% xmm1)) 299 (orl ($ '1) (%l temp0)) 300 (jmp @test) 301 @loop 302 (movdqa (@ x8664::miscdataoffset (% b0) (% temp0)) (% xmm0)) 303 (pxor (% xmm1) (% xmm0)) 304 (movdqa (% xmm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 305 @test 306 (subq ($ '2) (% temp0)) 307 (jg @loop) 308 (movq (@ x8664::miscdataoffset (% b0)) (% imm0)) 309 (notq (% imm0)) 310 (movq (% imm0) (@ x8664::miscdataoffset (% dest))) 311 (singlevaluereturn 3)) 312 313 (defx86lapfunction %boolec2 ((len 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 314 (movq (@ len (% rsp)) (% temp0)) 315 (pcmpeqb (% xmm1) (% xmm1)) 316 (orl ($ '1) (%l temp0)) 317 (jmp @test) 318 @loop 319 (movaps (@ x8664::miscdataoffset (% b1) (% temp0)) (% xmm0)) 320 (pxor (% xmm1) (% xmm0)) 321 (movaps (% xmm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 322 @test 323 (subq ($ '2) (% temp0)) 324 (jg @loop) 325 (movq (@ x8664::miscdataoffset (% b1)) (% imm0)) 326 (notq (% imm0)) 327 (movq (% imm0) (@ x8664::miscdataoffset (% dest))) 328 (singlevaluereturn 3)) 329 330 (defx86lapfunction %booleand ((len 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 331 (movq (@ len (% rsp)) (% temp0)) 332 (orl ($ '1) (%l temp0)) 333 (jmp @test) 334 @loop 335 (movaps (@ x8664::miscdataoffset (% b0) (% temp0)) (% xmm0)) 336 (pand (@ x8664::miscdataoffset (% b1) (% temp0)) (% xmm0)) 337 (movaps (% xmm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 338 @test 339 (subq ($ '2) (% temp0)) 340 (jg @loop) 341 (movq (@ x8664::miscdataoffset (% b0)) (% imm0)) 342 (andq (@ x8664::miscdataoffset (% b1)) (% imm0)) 343 (movq (% imm0) (@ x8664::miscdataoffset (% dest))) 344 (singlevaluereturn 3)) 345 346 (defx86lapfunction %booleior ((len 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 347 (movq (@ len (% rsp)) (% temp0)) 348 (orl ($ '1) (%l temp0)) 349 (jmp @test) 350 @loop 351 (movaps (@ x8664::miscdataoffset (% b0) (% temp0)) (% xmm0)) 352 (por (@ x8664::miscdataoffset (% b1) (% temp0)) (% xmm0)) 353 (movaps (% xmm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 354 @test 355 (subq ($ '2) (% temp0)) 356 (jg @loop) 357 (movq (@ x8664::miscdataoffset (% b0)) (% imm0)) 358 (orq (@ x8664::miscdataoffset (% b1)) (% imm0)) 359 (movq (% imm0) (@ x8664::miscdataoffset (% dest))) 360 (singlevaluereturn 3)) 361 362 (defx86lapfunction %boolexor ((len 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 363 (movq (@ len (% rsp)) (% temp0)) 364 (orl ($ '1) (%l temp0)) 365 (jmp @test) 366 @loop 367 (movaps (@ x8664::miscdataoffset (% b0) (% temp0)) (% xmm0)) 368 (pxor (@ x8664::miscdataoffset (% b1) (% temp0)) (% xmm0)) 369 (movaps (% xmm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 370 @test 371 (subq ($ '2) (% temp0)) 372 (jg @loop) 373 (movq (@ x8664::miscdataoffset (% b0)) (% imm0)) 374 (xorq (@ x8664::miscdataoffset (% b1)) (% imm0)) 375 (movq (% imm0) (@ x8664::miscdataoffset (% dest))) 376 (singlevaluereturn 3)) 377 378 (defx86lapfunction %booleeqv ((len 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 379 (movq (@ len (% rsp)) (% temp0)) 380 (orl ($ '1) (%l temp0)) 381 (pcmpeqb (% xmm1) (% xmm1)) 382 (jmp @test) 383 @loop 384 (movaps (@ x8664::miscdataoffset (% b0) (% temp0)) (% xmm0)) 385 (pxor (@ x8664::miscdataoffset (% b1) (% temp0)) (% xmm0)) 386 (pxor (% xmm1) (% xmm0)) 387 (movaps(% xmm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 388 @test 389 (subq ($ '2) (% temp0)) 390 (jg @loop) 391 (movq (@ x8664::miscdataoffset (% b0)) (% imm0)) 392 (xorq (@ x8664::miscdataoffset (% b1)) (% imm0)) 393 (notq (% imm0)) 394 (movq (% imm0) (@ x8664::miscdataoffset (% dest))) 395 (singlevaluereturn 3)) 396 397 (defx86lapfunction %boolenand ((len 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 398 (movq (@ len (% rsp)) (% temp0)) 399 (orl ($ '1) (%l temp0)) 400 (pcmpeqb (% xmm1) (% xmm1)) 401 (jmp @test) 402 @loop 403 (movaps (@ x8664::miscdataoffset (% b0) (% temp0)) (% xmm0)) 404 (pand (@ x8664::miscdataoffset (% b1) (% temp0)) (% xmm0)) 405 (pxor (% xmm1) (% xmm0)) 406 (movaps(% xmm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 407 @test 408 (subq ($ '2) (% temp0)) 409 (jg @loop) 410 (movq (@ x8664::miscdataoffset (% b0)) (% imm0)) 411 (andq (@ x8664::miscdataoffset (% b1)) (% imm0)) 412 (notq (% imm0)) 413 (movq (% imm0) (@ x8664::miscdataoffset (% dest))) 414 (singlevaluereturn 3)) 415 416 (defx86lapfunction %boolenor ((len 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 417 (movq (@ len (% rsp)) (% temp0)) 418 (orl ($ '1) (%l temp0)) 419 (pcmpeqb (% xmm1) (% xmm1)) 420 (jmp @test) 421 @loop 422 (movaps (@ x8664::miscdataoffset (% b0) (% temp0)) (% xmm0)) 423 (por (@ x8664::miscdataoffset (% b1) (% temp0)) (% xmm0)) 424 (pxor (% xmm1) (% xmm0)) 425 (movaps(% xmm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 426 @test 427 (subq ($ '2) (% temp0)) 428 (jg @loop) 429 (movq (@ x8664::miscdataoffset (% b0)) (% imm0)) 430 (orq (@ x8664::miscdataoffset (% b1)) (% imm0)) 431 (notq (% imm0)) 432 (movq (% imm0) (@ x8664::miscdataoffset (% dest))) 433 (singlevaluereturn 3)) 434 435 (defx86lapfunction %booleandc1 ((len 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 436 (movq (@ len (% rsp)) (% temp0)) 437 (orl ($ '1) (%l temp0)) 438 (pcmpeqb (% xmm1) (% xmm1)) 439 (jmp @test) 440 @loop 441 (movaps (@ x8664::miscdataoffset (% b0) (% temp0)) (% xmm0)) 442 (pxor (% xmm1) (% xmm0)) 443 (pand (@ x8664::miscdataoffset (% b1) (% temp0)) (% xmm0)) 444 (movaps (% xmm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 445 @test 446 (subq ($ '2) (% temp0)) 447 (jg @loop) 448 (movq (@ x8664::miscdataoffset (% b0)) (% imm0)) 449 (notq (% imm0)) 450 (andq (@ x8664::miscdataoffset (% b1)) (% imm0)) 451 (movq (% imm0) (@ x8664::miscdataoffset (% dest))) 452 (singlevaluereturn 3)) 453 454 (defx86lapfunction %booleandc2 ((len 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 455 (movq (@ len (% rsp)) (% temp0)) 456 (orl ($ '1) (%l temp0)) 457 (pcmpeqb (% xmm1) (% xmm1)) 458 (jmp @test) 459 @loop 460 (movaps (@ x8664::miscdataoffset (% b1) (% temp0)) (% xmm0)) 461 (pxor (% xmm1) (% xmm0)) 462 (pand (@ x8664::miscdataoffset (% b0) (% temp0)) (% xmm0)) 463 (movaps (% xmm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 464 @test 465 (subq ($ '2) (% temp0)) 466 (jg @loop) 467 (movq (@ x8664::miscdataoffset (% b1)) (% imm0)) 468 (notq (% imm0)) 469 (andq (@ x8664::miscdataoffset (% b0)) (% imm0)) 470 (movq (% imm0) (@ x8664::miscdataoffset (% dest))) 471 (singlevaluereturn 3)) 472 473 (defx86lapfunction %booleorc1 ((len 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 474 (movq (@ len (% rsp)) (% temp0)) 475 (orl ($ '1) (%l temp0)) 476 (pcmpeqb (% xmm1) (% xmm1)) 477 (jmp @test) 478 @loop 479 (movaps (@ x8664::miscdataoffset (% b0) (% temp0)) (% xmm0)) 480 (pxor (% xmm1) (% xmm0)) 481 (por (@ x8664::miscdataoffset (% b1) (% temp0)) (% xmm0)) 482 (movaps (% xmm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 483 @test 484 (subq ($ '2) (% temp0)) 485 (jg @loop) 486 (movq (@ x8664::miscdataoffset (% b0)) (% imm0)) 487 (notq (% imm0)) 488 (orq (@ x8664::miscdataoffset (% b1)) (% imm0)) 489 (movq (% imm0) (@ x8664::miscdataoffset (% dest))) 490 (singlevaluereturn 3)) 491 492 (defx86lapfunction %booleorc2 ((len 8) #(ra 0)# (b0 arg_x) (b1 arg_y) (dest arg_z)) 493 (movq (@ len (% rsp)) (% temp0)) 494 (orl ($ '1) (%l temp0)) 495 (pcmpeqb (% xmm1) (% xmm1)) 496 (jmp @test) 497 @loop 498 (movaps (@ x8664::miscdataoffset (% b1) (% temp0)) (% xmm0)) 499 (pxor (% xmm1) (% xmm0)) 500 (por (@ x8664::miscdataoffset (% b0) (% temp0)) (% xmm0)) 501 (movq (% xmm0) (@ x8664::miscdataoffset (% dest) (% temp0))) 502 @test 503 (subq ($ '2) (% temp0)) 504 (jg @loop) 505 (movq (@ x8664::miscdataoffset (% b1)) (% imm0)) 506 (notq (% imm0)) 507 (orq (@ x8664::miscdataoffset (% b0)) (% imm0)) 508 (movq (% imm0) (@ x8664::miscdataoffset (% dest))) 345 509 (singlevaluereturn 3)) 346 510 … … 367 531 368 532 (defun %simplebitboole (op b1 b2 result) 369 (let* ((f (svref *simplebitboolefunctions* op))) 370 (dotimes (i (ash (the fixnum (+ (length result) 63)) 6) result) 371 (funcall f i b1 b2 result)))) 533 (funcall (svref *simplebitboolefunctions* op) 534 (ash (the fixnum (+ (length result) 63)) 6) 535 b1 536 b2 537 result)) 372 538 373 539 (defx86lapfunction %aref2 ((array arg_x) (i arg_y) (j arg_z))
Note: See TracChangeset
for help on using the changeset viewer.