x86: fix _arch_syscall_invoke6

arg6 is treated as a memory constraint. If that memory
address was expressed as an operand to 'mov' in the generated
code as an offset from the stack pointer, then the 'push'
instruction immediately before it could end up causing memory 4
bytes off from what was intended being passed in as the 6th
argument.

Add ESP register to the clobber list to fix this issue.

Fixes issues observed with k_thread_create() passing in a
NULL argument list with CONFIG_DEBUG=y.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
1 file changed