Eliding of slice range checking

Per Nordlöw per.nordlow at gmail.com
Tue Oct 29 23:03:33 UTC 2019


On Wednesday, 23 October 2019 at 13:51:19 UTC, kinke wrote:
> You call this messy?!
>
> cmpq	%rdi, %rdx
> 	jae	.LBB0_2
> 	xorl	%eax, %eax
> 	retq
> .LBB0_2:
> 	movq	%rdi, %rax
> 	testq	%rdi, %rdi
> 	je	.LBB0_3
> 	pushq	%rax
> 	.cfi_def_cfa_offset 16
> 	movq	%rcx, %rdi
> 	movq	%rax, %rdx
> 	callq	memcmp at PLT
> 	testl	%eax, %eax
> 	sete	%al
> 	addq	$8, %rsp
> 	.cfi_def_cfa_offset 8
> 	retq
> .LBB0_3:
> 	movb	$1, %al
> 	retq

No, this is fine. Thanks.


More information about the Digitalmars-d-learn mailing list