![]() |
#32
|
|||
|
|||
we can use .asm file with custom build in vc to support x64 asm
|
#33
|
|||
|
|||
Sorry to bump such an old thread, but another alternative to using a different compiler or linking in .asm files is to use a library such as AsmJit* (it's what I use to dynamically generate code stubs for things like robust DLL injection, remote export calling, etc etc).
Obviously there is more overhead as you need to 'JIT' the function, but this is a one-off cost, and if you're worried about using the code in performance critical areas of your code you can simply JIT all your functions at startup and cache them rather than on-demand. * AsmJit project page: https://code.google.com/p/asmjit/ |
The Following User Gave Reputation+1 to RaptorFactor For This Useful Post: | ||
cyberbob (05-18-2011) |
The Following User Says Thank You to RaptorFactor For This Useful Post: | ||
Indigo (07-19-2019) |
#35
|
|||
|
|||
Quote:
AFAIK this feature is not present in older versions of VS and you need to specify a custom build step to compile *.asm files. To do so add your *.asm files to your project, right click them and select Properties. The Item Type property should show Does not participate in build. Change this to Custom Build Tool and hit Apply. A new category should appear in the properties tree which allows you to specify the command line to run, message to print to build log, what files it outputs etc. For building *.asm files the Command Line and Outputs should look like that: Code:
Command Line: ml /c /Fo"$(IntDir)%(Filename).obj" "%(FullPath)" Outputs: "$(IntDir)%(Filename).obj" |
The Following User Gave Reputation+1 to ArC For This Useful Post: | ||
Av0id (06-13-2011) |
The Following User Says Thank You to ArC For This Useful Post: | ||
Indigo (07-19-2019) |
#37
|
|||
|
|||
its plug&play type software, you can hardly fail.. just after installing compiler right click your project and select something like 'use intel compiler blah blah blah'
|
The Following User Says Thank You to rox For This Useful Post: | ||
Indigo (07-19-2019) |
#38
|
|||
|
|||
Does anyone have any empirical or measured benchmarks on how well the Intel C/C++ compiler does vs Microsoft's? Aside from the X64 inline assembly support, I'm just wondering if there is a compelling reason to switch. It would seem it is likely to generate optimal code, but is the code generated tuned for Intel processors? Hmm...
Quote:
Quote:
I believe it is because of your aforementioend issue, though who knows for sure. I believe they want to discourage any inline assembly, of any type, and took the chance to not add this feature. |
#39
|
|||
|
|||
dbcch:
It appears you turned what should easily have been one post into three, which makes it appear like attempting to just increase your post count. I have combined them into one post, rather than just deleting them. ![]() Regards,
__________________
JMI |
The Following User Says Thank You to JMI For This Useful Post: | ||
Indigo (07-19-2019) |
#40
|
|||
|
|||
.... Ok, thanks. I see what you mean now, that 25 post to get to downloads stuff. I don't want downloads, so you can cancel me from downloads forever as opposed to treating my posts as part of any scheme.
|
#41
|
||||
|
||||
Quote:
Quote:
![]() |
The Following User Says Thank You to deepzero For This Useful Post: | ||
Indigo (07-19-2019) |
#42
|
|||
|
|||
I was pleasantly surprised to see that MSVS2008 can support .asm files with little trouble. Inline asm is ok but linking external obj files is still better than no asm imho.
HR, Ghandi Last edited by Ghandi2006; 01-04-2012 at 20:02. |
The Following User Says Thank You to Ghandi2006 For This Useful Post: | ||
Indigo (07-19-2019) |
#43
|
|||
|
|||
I apologise for the bump but I have a question.
I read some things about ICC neutering AMD performance when compiling. Since it seems ICC is the only option for inline x64 these days with MSVC, I am wondering if this is still the case. Yeah, using NASM is no issue at all, but inline ASM would be nice. Thanks in advance. |
#44
|
|||
|
|||
Quote:
|
The Following User Says Thank You to pp2 For This Useful Post: | ||
Indigo (07-19-2019) |
#45
|
|||
|
|||
I think the intrinstic assembly is more general.
|
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
inline patche | hp3 | Source Code | 3 | 06-04-2021 14:48 |
How to inline x64 asm in vs2017 ? | Mahmoudnia | General Discussion | 25 | 07-22-2018 01:04 |
Inline Patching | MaRKuS-DJM | General Discussion | 1 | 01-24-2004 23:03 |