<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.0.9">
</HEAD>
<BODY>
Suppose I wanted to, say, write glibc for LLVM (fat chance! :) I would need at some point to write (hopefully a small amount) of native code to, say, access specific registers, handle interrupts, or generate operating system traps. <BR>
<BR>
From my (somewhat cursory) review of AsmParser, it seems like this can't be done with LLVM right now. There is nothing in AsmParser or the rest of LLVM that would allow native assembly instructions to be passed through to the back end.<BR>
<BR>
Is my finding correct or can this be done currently with LLVM in some way I haven't found?<BR>
<BR>
What is the alternative? Write a library function in C and have it called by LLVM?<BR>
<BR>
The reason I'm asking is that I'd like as much code as possible to be open to optimization by LLVM. If the core of my runtime library can't be expressed in LLVM then it can't be optimized by it either.  Ideally, everything except the glue for system traps, interrupts and the like should be expressible in LLVIS.<BR>
<BR>
</BODY>
</HTML>