Re: sigtrap and TF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05-12-07 22:23, Justin Ferguson wrote:

I suppose there was some text to go here, but anyways:

void
unsetTF(void)
{
        __asm__ __volatile__(
                                "pushf                  \n"
                                "mov    $0x100, %eax    \n"
                                "not    %eax            \n"
                                "andl   (%esp), %eax    \n"
                                "popf                   \n"
        );
}

void
setTF(void)
{
        __asm__ __volatile__(
                                "pushf                  \n"
                                "orl    $0x100, (%esp)  \n"
                                "popf                   "
        );

        return;
}

... in the context of the list, note that ~ denotes a bitwise not same in gas as in C. That is, unsetTF could use the setTF template and be:

	pushf
	andl    $~0x100, (%esp)
	popf

Rene.


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux