New Job, SP1

I recently switched from the lead of the Code Gen & Tools team for Visual C++ to the lead for the Code Gen team for the .Net Framework.  I’ve not used managed code much, but for some classes of code, it sure does look easier to use [I’m working on a goofy GUI app for…

3

Speaking in ‘public’…

I’ll be hanging out with the cool kids at the Northwest C++ Users Group tomorrow night.  If you’re in the area, and want to heckle me, swing by.  We’ll be in building 40 at 6:30 PM.  My talk starts at 7:00 PM.  I’m talking about the actual runtime cost of exception handling for x64 and x86…

4

Bug in x86 inline assembly to watch out for

Imagine this very lame code:int main() {} void BugAsm() { __asm { MOV [ESP+12],OFFSET main } } void(*BugAsmPt)()=&BugAsm; // this is just to make sure the function is not removed by /OPT:REF Now imagine your significantly less lame code doing something similar.Now imagine that the compiler crashes with a bizzare message about “x86\code.c” something or…

2

A more flexible array template [and the evolution of the idea]

{Disclaimer – I started with a bunch of code from boost::array – it’s a great implementation of the functionality it provides} While my day job doesn’t generally allow me to goof around with advanced C++ features, I still managed to find time to do so after the kids are in bed.  Mark & I were…

4

ML64 bug to watch out for

If you’re porting your application to x64, and you use much in the way of __asm in your x86 code, you’re likely to start looking at ml64 – the 64 bit version of Masm.  The reason you’re likely to do this is that the x64 compiler doesn’t support __asm blocks in C code.  So you…

0

Visual C++ Code Gen & Tools bugs

My role for the past 6 months (and the next several) I’m charged with effectively “going down with the ship” WRT the current generation of code gen & tools for Visual C++.  This includes the linker, Masm, ml64, DIA, c2, pdb, and a few other miscellaneous components.  The entire ball of wax is to be…

2

Language & Library Evolution

Let’s say you have a programming language, K– version 1.0, with it’s accompanying runtime library, stdK–. And it turns out that the language needed some new features, like concepts, thread safety, concurrency, a strong memory model, improved security, and the library needed to repair, oh, perhaps a really awful std::kstring implementation, and perhaps std::vektor<bool>. But…

1

Updated ABI docs available + Exception Handling info

They’re not marvelously better, but they include the introduction that I wrote a couple years ago (and have mirrored in this blog twice, now). So, check out http://msdn2.microsoft.com/en-us/library/7kcdt6fy(VS.80).aspx to see the x64 ABI stuff in all it’s MSDN formatted glory. In other news, I presented a talk at the Developer Division ‘brown bag’ performance series…

9

How to get CL.exe proxy filters (like STLFilt) working under VS2005

There’s a class of tools that lots of people write that replace cl.exe with a ‘wrapper’ to do things link pre-process a command line [perhaps adding particular -D arguments], or filtering the output to deal with things like psychotically complicated error messages from template metaprogramming. These tools tend to be incredibly useful, and also tend…

8

What does "Hot Patchability" mean and what is it for?

I got a question on my earlier ABI post about Hot Patchability, so I thought I’d go into excruciating detail on that one, since it’s not quite as complicated as exception handling What the heck does Hot Patchable mean? Hot patchable means that, primarily, you’re able to take a running application and, given sufficient privileges,…

7