7 #if defined(__x86_64__)
10 sub $16,%rsp // space to read IDTR
12 sidt (%rsp) // store limit:base on stack
13 movw (%rsp), %rax // get limit
14 and $0xfff, %rax // mask off lower 12 bits to return
19 #elif defined(__i386__)
22 sub $8, %esp // space to read IDTR
24 sidt (%esp) // store limit:base on stack
25 movw (%esp), %ax // get limit
26 and $0xfff, %eax // mask off lower 12 bits to return
32 #error Unsupported architecture