1 static void
arch_sigreturn(struct tcb * tcp)2 arch_sigreturn(struct tcb *tcp)
3 {
4 	/*
5 	 * On i386, sigcontext is followed on stack by struct fpstate
6 	 * and after it an additional u32 extramask which holds
7 	 * upper half of the mask.
8 	 */
9 	struct {
10 		uint32_t struct_sigcontext_padding1[20];
11 		uint32_t oldmask;
12 		uint32_t struct_sigcontext_padding2;
13 		uint32_t struct_fpstate_padding[156];
14 		uint32_t extramask;
15 	} frame;
16 
17 	if (umove(tcp, *i386_esp_ptr, &frame) < 0) {
18 		tprintf("{mask=%#lx}", (unsigned long) *i386_esp_ptr);
19 	} else {
20 		uint32_t mask[2] = { frame.oldmask, frame.extramask };
21 		tprintsigmask_addr("{mask=", mask);
22 		tprints("}");
23 	}
24 }
25