[gnutls-devel] [PATCH] Removed the invariant htype parameter of _gnutls_recv_int()

Jaak Ristioja jaak.ristioja at cyber.ee
Mon Feb 15 09:32:18 CET 2016


On 14.02.2016 12:46, Nikos Mavrogiannopoulos wrote:
> On Fri, 2016-02-12 at 16:59 +0200, Jaak Ristioja wrote:
>> All uses of _gnutls_recv_int() passed -1 as the htype argument of 
>> type
>> gnutls_handshake_description_t, which had been used for SSLv2 client
>> hellos. Introduced in 2001 with dc1122e7b6.
> 
> Hello Jaak,
>  Could you give some more context on this change?

I just stumbled upon this while examining the code. I found that
_gnutls_recv_int had a lot of parameters (8). I know from [1] that for
x86_64 up to only 6 of these arguments are passed in registers
(%rdi,%rsi,%rdx,%rcx,%r8,%r9) and the rest are put onto the stack. So I
took a look at `objdump -DC` output and tried to microoptimize for
performance, but I also think this change improves code readability.

Best regards,
Jaak

[1] System V Application Binary Interface
http://www.x86-64.org/documentation/abi.pdf



More information about the Gnutls-devel mailing list