Skip to content

Commit

Permalink
Update expected codegen for gcc 10 [@optional_int_return_default_ctor…
Browse files Browse the repository at this point in the history
…] (codegen)
  • Loading branch information
NUCLEAR-BOMB committed Nov 19, 2024
1 parent bf37d24 commit beea958
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/codegen/sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,19 @@ opt::option<int> option_int_return_none() {
//$ mov rax, qword ptr [rsp - 0x8]
//$ ret

//$ @optional_int_return_default_ctor {gcc <11}:
//$ @optional_int_return_default_ctor {gcc 10..<11}:
//$ mov dword ptr [rsp - 0xc], 0x0
//$ mov rax, qword ptr [rsp - 0x10]
//$ ret

//$ @optional_int_return_default_ctor {gcc <10}:
//$ xor eax, eax
//$ mov byte ptr [rsp - 0x9], 0x0
//$ mov word ptr [rsp - 0xb], ax
//$ mov byte ptr [rsp - 0xc], 0x0
//$ mov rax, qword ptr [rsp - 0x10]
//$ ret

//$ @optional_int_return_default_ctor {msvc}:
//$ mov byte ptr [rcx + 0x4], 0x0
//$ mov rax, rcx
Expand Down

0 comments on commit beea958

Please sign in to comment.