#
# Compiler defines.
#
-LOCAL_CFLAGS += -fstrict-aliasing -Wstrict-aliasing=2 -fno-align-jumps
+
+LOCAL_CFLAGS += -fstrict-aliasing -Wstrict-aliasing=2
LOCAL_CFLAGS += -Wall -Wextra -Wno-unused-parameter
LOCAL_CFLAGS += -DARCH_VARIANT=\"$(dvm_arch_variant)\"
+ifneq ($(strip $(LOCAL_CLANG)),true)
+LOCAL_CFLAGS += -fno-align-jumps
+endif
+
#
# Optional features. These may impact the size or performance of the VM.
#
* 16-bit op, we convert the opcode from "packed" form (e.g. 0x0108) to
* bytecode form (e.g. 0x08ff).
*/
-static inline void updateOpcode(const Method* meth, u2* ptr, Opcode opcode)
+static inline void updateOpcode(const Method* meth, u2* ptr, u2 opcode)
{
if (opcode >= 256) {
/* opcode low byte becomes high byte, low byte becomes 0xff */
assert((ptr[0] & 0xff) == 0xff);
- dvmUpdateCodeUnit(meth, ptr, (u2) (opcode << 8) | 0x00ff);
+ dvmUpdateCodeUnit(meth, ptr, (opcode << 8) | 0x00ff);
} else {
/* 8-bit op, just replace the low byte */
assert((ptr[0] & 0xff) != 0xff);
- dvmUpdateCodeUnit(meth, ptr, (ptr[0] & 0xff00) | (u2) opcode);
+ dvmUpdateCodeUnit(meth, ptr, (ptr[0] & 0xff00) | opcode);
}
}
/* shouldn't happen */
ALOGE("GLITCH: bad format (%d)", format);
dvmAbort();
+ /* Make compiler happy */
+ addr = 0;
}
const RegType* regs = vdata->registerLines[addr].regTypes;
dvmCompilerDataFlowAttributes[mir->dalvikInsn.opcode];
/* Skip extended MIR instructions */
- if (dInsn->opcode >= kNumPackedOpcodes) continue;
+ if ((u2) dInsn->opcode >= kNumPackedOpcodes) continue;
int instrFlags = dexGetFlagsFromOpcode(dInsn->opcode);
int hprofSetGcScanState(hprof_context_t *ctx,
hprof_heap_tag_t state, u4 threadSerialNumber);
-int hprofMarkRootObject(hprof_context_t *ctx,
- const Object *obj, jobject jniObj);
+void hprofMarkRootObject(hprof_context_t *ctx,
+ const Object *obj, jobject jniObj);
int hprofDumpHeapObject(hprof_context_t *ctx, const Object *obj);
* only true when marking the root set or unreachable
* objects. Used to add rootset references to obj.
*/
-int hprofMarkRootObject(hprof_context_t *ctx, const Object *obj, jobject jniObj)
+void hprofMarkRootObject(hprof_context_t *ctx, const Object *obj,
+ jobject jniObj)
{
hprof_record_t *rec = &ctx->curRec;
- int err;
hprof_heap_tag_t heapTag = (hprof_heap_tag_t)ctx->gcScanState;
if (heapTag == 0) {
- return 0;
+ return;
}
if (ctx->objectsInSegment >= OBJECTS_PER_SEGMENT ||
break;
default:
- err = 0;
break;
}
ctx->objectsInSegment++;
-
- return err;
}
static int stackTraceSerialNumber(const void *obj)