lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 23 Nov 2009 11:14:42 +0800
From:	Johnny Hung <johnny.hacking@...il.com>
To:	Jiri Slaby <jirislaby@...il.com>
Cc:	kernelnewbies@...linux.org, linux-kernel@...r.kernel.org,
	linux-embedded@...r.kernel.org
Subject: Re: How to move two valuables to x86 CPU register ebx, ecx by using 
	AT&A inline asm.

After testing:

# gcc inlineasm.c
inlineasm.c: Assembler messages:
inlineasm.c:7: Error: suffix or operands invalid for `out'
[root@...ian-johnny] ~/workspace/test

# cat inlineasm.c
#include <stdio.h>

int main ()
{
    unsigned int val = 5, tmp = 10;
    asm volatile ("outb $0x27, %%al"
     :
     : "a" (0xb2), "b"(val), "c" (tmp)
    );
}

    It seems the source of outb instruction cannot be a constant. Is
there a AT&T instructions document for x86?

BRs, H. Johnny
> Why not just:
> ("outb $0x27, %%al" : : "a" (0xb2), "b"(val), "c" (tmp));
> --
> js
> Faculty of Informatics, Masaryk University
> Suse Labs, Novell
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ