Re: What does atomic_read actually do?

From: Arjan van de Ven (arjan_at_infradead.org)
Date: 12/20/04

  • Next message: Ed Tomlinson: "Re: RFC: [2.6 patch] let BLK_DEV_UB depend on EMBEDDED"
    To: Joseph Seigh <jseigh_02@xemaps.com>
    Date:	Mon, 20 Dec 2004 12:51:39 +0100
    
    

    > I'm aware of that. I'm not asking a question about x86 architecture. I'm
    > asking what guarantees that the compiler will load the int using one MOV
    > instruction since there's nothing in the C standard that requires that,
    > even
    > for volatile. I think it's unlikely the compiler would use multiple loads
    > a byte at a time but it really requires a compiler person to
    > authoritatively
    > make that statement.

    well... nothing really guarantees it other than that it's rather really
    hard to NOT do it with one mov. And the gcc people care about their
    quality of implementation enough that they will never do this...

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


  • Next message: Ed Tomlinson: "Re: RFC: [2.6 patch] let BLK_DEV_UB depend on EMBEDDED"

    Relevant Pages

    • Re: compiler generated output
      ... compiler to generate code which only uses 386 instruction). ... Thus, while replacing mov/and with movzx, the jump is still there. ... 00000001`00001c65 66894c2408 mov,cx ...
      (comp.lang.asm.x86)
    • Re: Compiler bug in the DDK--be aware of it
      ... I am new to driver development. ... I traced it down to a bug in the compiler. ... mov edx, OFFSET FLAT:?Init ... mov esi, eax ...
      (microsoft.public.development.device.drivers)
    • Re: Help with running IBM-COBOL ver 1.0 on Windows 2000/XP
      ... 0BA3:17E9 xchg dx,ax ... 0BA3:17EE mov,al ... IBM Personal Computer COBOL Compiler ...
      (comp.lang.cobol)
    • Re: [discuss] booting a kernel compiled with -mregparm=0
      ... > this one) and even if GCC produced valid code by miracle, ... That's the default for a 'C' compiler (not to pass parameters ... This forced some parameters to be passed in registers, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: PCI Grafikkarte Empfehlung gesucht
      ... zusammen mit einer XOR-Operation (wohl aber für MOV). ... Solche Dinge machen es einem Compiler ... der Z80 kommt ja vom gleichen Vater: ... Der Witz einer Hochsprache ist es aber eben, eigentlich kein Assembler ...
      (de.comp.hardware.graphik)