far smaller assmbly
This commit is contained in:
8
build.cm
8
build.cm
@@ -489,6 +489,9 @@ function compile_native_batched(il_parts, cc, tmp_prefix) {
|
||||
var ai = 0
|
||||
var rc = null
|
||||
var parallel_cmd = null
|
||||
var helpers_il = (il_parts.helpers && length(il_parts.helpers) > 0)
|
||||
? text(il_parts.helpers, "\n") : ""
|
||||
var prefix = null
|
||||
|
||||
if (nfuncs < nbatch) nbatch = nfuncs
|
||||
if (nbatch < 1) nbatch = 1
|
||||
@@ -501,7 +504,9 @@ function compile_native_batched(il_parts, cc, tmp_prefix) {
|
||||
batch_fns[] = il_parts.functions[fi]
|
||||
fi = fi + 1
|
||||
}
|
||||
batch_il = il_parts.data + "\n\n" + text(batch_fns, "\n")
|
||||
// Batch 0 includes helper functions; others reference them as external symbols
|
||||
prefix = (bi == 0 && helpers_il != "") ? helpers_il + "\n\n" : ""
|
||||
batch_il = il_parts.data + "\n\n" + prefix + text(batch_fns, "\n")
|
||||
asm_text = os.qbe(batch_il)
|
||||
s_path = tmp_prefix + '_b' + text(bi) + '.s'
|
||||
o_path = tmp_prefix + '_b' + text(bi) + '.o'
|
||||
@@ -595,7 +600,6 @@ Build.compile_native = function(src_path, target, buildtype, pkg) {
|
||||
sym_name = shop.c_symbol_for_file(pkg, fd.basename(src_path))
|
||||
}
|
||||
var il_parts = qbe_emit(optimized, qbe_macros, sym_name)
|
||||
var il = il_parts.data + "\n\n" + text(il_parts.functions, "\n")
|
||||
|
||||
// Content hash for cache key
|
||||
var hash = content_hash(src + '\n' + _target + '\nnative')
|
||||
|
||||
1109
qbe_emit.cm
1109
qbe_emit.cm
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user