lkml.org 
[lkml]   [1998]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: NOP instruction
    On Wed, Dec 16, 1998 at 11:36:00AM +1030, Mofeed Shahin wrote:

    > Ummm, I was under the impression that NOP under the intel was 0x90...

    nope

    > I am pretty sure the intel does have a real NOP.

    don't think so:

    [me:1] caffeine:~$ cat nop.S
    .text

    _start: .globl _start

    nop
    cpuid
    xchg %eax,%eax

    movl $0x01,%eax
    movl $0x00,%ebx
    int $0x80
    [me:1] caffeine:~$ as -Qy -o nop.o nop.S
    [me:1] caffeine:~$ objdump -d -S nop.o

    nop.o: file format elf32-i386

    Disassembly of section .text:

    00000000 <_start>:
    0: 90 nop
    1: 0f a2 cpuid
    3: 90 nop
    4: b8 01 00 00 00 movl $0x1,%eax
    9: bb 00 00 00 00 movl $0x0,%ebx
    e: cd 80 int $0x80


    As you can see -- gas treats nop as xchg %eax,%eax.





    -cw

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:46    [W:0.022 / U:29.724 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site