MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / format_func_value

Function format_func_value

lib/asmjit/asmjit/core/formatter.cpp:327–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325
326#ifndef ASMJIT_NO_COMPILER
327static Error format_func_value(String& sb, FormatFlags format_flags, const BaseEmitter* emitter, FuncValue value) noexcept {
328 TypeId type_id = value.type_id();
329 ASMJIT_PROPAGATE(format_type_id(sb, type_id));
330
331 if (value.is_assigned()) {
332 ASMJIT_PROPAGATE(sb.append('@'));
333
334 if (value.is_indirect()) {
335 ASMJIT_PROPAGATE(sb.append('['));
336 }
337
338 // NOTE: It should be either reg or stack, but never both. We
339 // use two IFs on purpose so if the FuncValue is both it would
340 // show in logs.
341 if (value.is_reg()) {
342 ASMJIT_PROPAGATE(format_register(sb, format_flags, emitter, emitter->arch(), value.reg_type(), value.reg_id()));
343 }
344
345 if (value.is_stack()) {
346 ASMJIT_PROPAGATE(sb.append_format("[%d]", int(value.stack_offset())));
347 }
348
349 if (value.is_indirect()) {
350 ASMJIT_PROPAGATE(sb.append(']'));
351 }
352 }
353
354 return Error::kOk;
355}
356
357static Error format_func_value_pack(
358 String& sb,

Callers 1

format_func_value_packFunction · 0.85

Calls 13

format_type_idFunction · 0.85
format_registerFunction · 0.85
is_indirectMethod · 0.80
reg_idMethod · 0.80
is_stackMethod · 0.80
append_formatMethod · 0.80
type_idMethod · 0.45
is_assignedMethod · 0.45
appendMethod · 0.45
is_regMethod · 0.45
archMethod · 0.45
reg_typeMethod · 0.45

Tested by

no test coverage detected