This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
isect: | |
pushq %rbp | |
xorps %xmm13, %xmm13 | |
movaps (%r8), %xmm2 | |
movq %rsp, %rbp | |
pushq %rbx | |
movaps (%r9), %xmm3 | |
movq 112(%rbp), %rbx | |
movq 88(%rbp), %rax | |
movaps (%rcx), %xmm1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
isect: | |
pushq %rbp | |
vxorpd %xmm12, %xmm12, %xmm12 | |
movq %rsp, %rbp | |
andq $-32, %rsp | |
subq $40, %rsp | |
movq 96(%rbp), %rax | |
movq 104(%rbp), %r10 | |
vmovapd (%rcx), %ymm0 | |
movq 40(%rbp), %rcx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_isect: | |
pushl %ebp | |
movl %esp, %ebp | |
andl $-32, %esp | |
pushl %edi | |
pushl %esi | |
pushl %ebx | |
subl $468, %esp | |
movl 20(%ebp), %edi | |
movl 80(%ebp), %esi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_isect: | |
pushl %ebp | |
xorps %xmm6, %xmm6 | |
movl %esp, %ebp | |
pushl %edi | |
pushl %esi | |
pushl %ebx | |
subl $220, %esp | |
movl 20(%ebp), %edi | |
movl 80(%ebp), %esi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <gmmintrin.h> | |
// x4 ~ x0 must have either value 0 or 1. | |
#define MM256_SHUFFLE(x3, x2, x1, x0) \ | |
((x3 << 3) | (x2 << 2) | (x1 << 1) | (x0)) | |
void | |
test() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)drawView { | |
// Replace the implementation of this method to do your own custom drawing | |
const GLfloat squareVertices[] = { | |
-0.75f, -0.75f, | |
0.75f, -0.75f, | |
-0.75f, 0.75f, | |
0.75f, 0.75f, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Macintosh-3: $ cat input.sl | |
surface | |
matte(float Ka = 1.0; float Kd = 1.1;) | |
{ | |
normal Nf = faceforward(normalize(N), I); | |
Oi = Os; | |
Ci = Os * Cs * (Ka * ambient() + Kd * diffuse(Nf)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(gdb) x/16i 0xd123010 | |
0xd123010: mov 0x4(%esp),%eax | |
0xd123014: movaps (%eax),%xmm0 | |
0xd123017: movaps %xmm0,0xd123060 | |
0xd12301e: movaps 0x10(%eax),%xmm0 | |
0xd123022: movaps %xmm0,0xd123070 | |
0xd123029: movaps 0x20(%eax),%xmm0 | |
0xd12302d: movaps %xmm0,0xd123080 | |
0xd123034: movaps 0x30(%eax),%xmm0 | |
0xd123038: movaps %xmm0,0xd123090 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(gdb) x/18i 0xd123010 | |
0xd123010: mov 0x4(%esp),%eax | |
0xd123014: movaps (%eax),%xmm0 | |
0xd123017: movaps %xmm0,0xd123080 | |
0xd12301e: movaps 0x10(%eax),%xmm0 | |
0xd123022: movaps %xmm0,0xd123090 | |
0xd123029: movaps 0x20(%eax),%xmm0 | |
0xd12302d: movaps %xmm0,0xd1230a0 | |
0xd123034: movaps 0x30(%eax),%xmm0 | |
0xd123038: movaps %xmm0,0xd1230b0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(gdb) x/4i 0xd123110 | |
0xd123110: movaps 0xd1230a0,%xmm0 | |
0xd123117: movaps %xmm0,0xd123080 | |
0xd12311e: ret | |
0xd12311f: add %dh,-0x13ffffff(%ebx) |