Intel originally wanted BIOS implementers to enumerate all physical CPUs first before logical (HT) CPUs. The reason for this was that if an operating system supported fewer CPUs than were available in the system, it would see the physical cores first before seeing the logical cores. This isn't an issue nowadays, but back when it was possible to buy a dual-core Pentium 4 w/ HT, put it into a Windows 2000 Pro system, and only see 2 CPUs no matter what, it was a real concern. I doubt that the implementation would deviate from that. So in your case it's most likely that CPUs 0-3 are the physical cores and CPUs 4-7 are the HT cores.
If you're having problems with your own multi-threaded software not balancing well because of HT, then you'll probably want to limit your thread count to the physical cores only, or work on your algorithms/data structures to be more HT-friendly. GetLogicalProcessorInformation is the API call you need to look at to determine physical vs. logical core count. This page has sample code for determining the # of Physical CPUs.
Making your code more HT-friendly is, well, a whole different ball of wax and not really suited for SuperUser. :-)