History

ensure function return now accounts for return type size

Ge Wang committed 3 years ago

Commit 2eec4e71 parent 4b6c7693 files · +46 −7Browse files

Showing the changes to src/core/chuck_instr.cpp (1 of 3 files). Show all

Unified · Split

src/core/chuck_instr.cpp+17−0
@@ -2041,6 +2041,23 @@ void Chuck_Instr_Reg_Push_Imm4::execute( Chuck_VM * vm, Chuck_VM_Shred * shred ) · 2040 unmodified lines
20412041
20422042
20432043
2044+//-----------------------------------------------------------------------------
2045+// name: execute()
2046+// desc: ...
2047+//-----------------------------------------------------------------------------
2048+void Chuck_Instr_Reg_Push_Zero::execute( Chuck_VM * vm, Chuck_VM_Shred * shred )
2049+{
2050+ t_CKBYTE *& reg_sp = (t_CKBYTE *&)shred->reg->sp;
2051+
2052+ // push val into reg stack
2053+ memset( reg_sp, 0, m_val );
2054+ // move stack pointer
2055+ reg_sp += m_val;
2056+}
2057+
2058+
2059+
2060+
20442061 //-----------------------------------------------------------------------------
20452062 // name: execute()
20462063 // desc: ...

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t