Skip to content

Instantly share code, notes, and snippets.

Created September 3, 2013 19:02
Show Gist options
  • Save anonymous/6428137 to your computer and use it in GitHub Desktop.
Save anonymous/6428137 to your computer and use it in GitHub Desktop.
asm """ ".byte 0xCC" """
asm """ "push %rcx" """
asm """ "push %rdx" """
asm """ "push %r8" """
asm """ "push %r9" """
asm """ "push %r10" """
asm """ "push %r11" """
asm """ "push %r12" """
asm """ "push %r13" """
asm """ "push %r14" """
asm """ "push %r15" """
asm """ "mov `navmBackendS1`, %rax" """
asm """ "mov `navmBackendS2`, %r8" """
asm """ "mov `navmBackendTempAdr`, %rdx" """
asm """ "call *%rdx" """
asm """ "mov %rax, `navmBackendS1`" """
asm """ "pop %r15" """
asm """ "pop %r14" """
asm """ "pop %r13" """
asm """ "pop %r12" """
asm """ "pop %r11" """
asm """ "pop %r10" """
asm """ "pop %r9" """
asm """ "pop %r8" """
asm """ "pop %rdx" """
asm """ "pop %rcx" """
compiles to:
nimln(2095, "navmInstructions.nim");
asm( ".byte 0xCC" );
nimln(2096, "navmInstructions.nim");
asm( "push %rcx" );
nimln(2097, "navmInstructions.nim");
asm( "push %rdx" );
nimln(2098, "navmInstructions.nim");
asm( "push %r8" );
nimln(2099, "navmInstructions.nim");
asm( "push %r9" );
nimln(2100, "navmInstructions.nim");
asm( "push %r10" );
nimln(2101, "navmInstructions.nim");
asm( "push %r11" );
nimln(2102, "navmInstructions.nim");
asm( "push %r12" );
nimln(2103, "navmInstructions.nim");
asm( "push %r13" );
nimln(2104, "navmInstructions.nim");
asm( "push %r14" );
nimln(2105, "navmInstructions.nim");
asm( "push %r15" );
nimln(2106, "navmInstructions.nim");
asm( "mov navmBackendS1, %rax" );
nimln(2107, "navmInstructions.nim");
asm( "mov navmBackendS2, %r8" );
nimln(2108, "navmInstructions.nim");
asm( "mov navmbackendtempadr_97727, %rdx" );
nimln(2109, "navmInstructions.nim");
asm( "call *%rdx" );
nimln(2110, "navmInstructions.nim");
asm( "mov %rax, navmBackendS1" );
nimln(2111, "navmInstructions.nim");
asm( "pop %r15" );
nimln(2112, "navmInstructions.nim");
asm( "pop %r14" );
nimln(2113, "navmInstructions.nim");
asm( "pop %r13" );
nimln(2114, "navmInstructions.nim");
asm( "pop %r12" );
nimln(2115, "navmInstructions.nim");
asm( "pop %r11" );
nimln(2116, "navmInstructions.nim");
asm( "pop %r10" );
nimln(2117, "navmInstructions.nim");
asm( "pop %r9" );
nimln(2118, "navmInstructions.nim");
asm( "pop %r8" );
nimln(2119, "navmInstructions.nim");
asm( "pop %rdx" );
nimln(2120, "navmInstructions.nim");
asm( "pop %rcx" );
popFrame();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment