X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=include%2Fust%2Fprocessor.h;h=b9a2f64e7b5caabb9b5cefb38051e7716cb9f073;hb=b10c692b2ad4fccc4763f965ca48e41f702dd718;hp=1eb584365e1116883c1605d3a4f9e9fb54feef1b;hpb=b4041302fdae8b40a44b0ba488acb276fe79bf4a;p=ust.git diff --git a/include/ust/processor.h b/include/ust/processor.h index 1eb5843..b9a2f64 100644 --- a/include/ust/processor.h +++ b/include/ust/processor.h @@ -53,6 +53,7 @@ struct registers { unsigned long r15; int cs; int ss; + unsigned long rflags; }; #define save_registers(regsptr) \ @@ -74,6 +75,9 @@ struct registers { "movq %%r15,%c[r15_off](%[regs])\n\t" \ "movw %%cs,%c[cs_off](%[regs])\n\t" \ "movw %%ss,%c[ss_off](%[regs])\n\t" \ + /* deal with rflags */ \ + "pushfq\n\t" /* push rflags on stack */ \ + "popq %c[rflags_off](%[regs])\n\t" \ : \ : [regs] "r" (regsptr), \ [rax_off] "i" (offsetof(struct registers, rax)), \ @@ -93,7 +97,8 @@ struct registers { [r14_off] "i" (offsetof(struct registers, r14)), \ [r15_off] "i" (offsetof(struct registers, r15)), \ [cs_off] "i" (offsetof(struct registers, cs)), \ - [ss_off] "i" (offsetof(struct registers, ss)) \ + [ss_off] "i" (offsetof(struct registers, ss)), \ + [rflags_off] "i" (offsetof(struct registers, rflags)) \ ); /* Macro to insert the address of a relative jump in an assembly stub,