News for hackers. Stuff that matters.
Re:New inline assembly syntax available in Rust nightly by koverstreet on Tuesday June 09, 2020 @07:34PM (#23472181)
You can also use intel syntax with inline assembly in gcc, e.g.:

        asm(".intel_syntax noprefix;"
            "xor eax, eax;"
            "xor edx, edx;"
            "1:;"
            "mov r8, [rdi];"
            "mov r9, [rsi];"
            "sub ecx, 64;"
            "jl 2f;"

            "cmp r8, r9;"
            "jnz 3f;"

            "lea rdi, [rdi - 8];"
            "lea rsi, [rsi - 8];"
            "jmp 1b;"

            "2:;"
            "not ecx;"
            "shr r8, 1;"
            "shr r9, 1;"
            "shr r8, cl;"
            "shr r9, cl;"
            "cmp r8, r9;"

            "3:\n"
            "seta al;"
            "setb dl;"
            "sub eax, edx;"
            ".att_syntax prefix;"
            : "=&D" (d0), "=&S" (d1), "=&d" (d2), "=&c" (d3), "=&a" (cmp)
            : "0" (l), "1" (r), "3" (nr_key_bits)
            : "r8", "r9", "cc", "memory");

There are no comments on this comment yet.