My understanding of "AnyCPU" when compiling .NET programs is that the compiled EXEs/DLLs should run on both x86 and x64 (and other?) CPUs.
I imagine that the generated Intermediate Language is translated by the Just-In-Time compiler to the relevant machine code, and that the .NET runtime knows the target CPU, so this makes sense.
What I don't understand is how an EXE (and therefore the JIT compiler / CLR) actually starts up; surely some machine code needs to exist at the entry point of the program? Wouldn't the target CPU architecture then need to be known ahead of compilation?
[Edit: Removed disassembled code, as I was looking at the wrong address]
What I didn't realise when I originally posted this question is how similar x86 and x64 machine code is, so my guess is that the code at the entry point is generated to work on both x86 and x64.