]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/commitdiff
osal: c7x-hostemu: Fix host-emulation build
authorDon Dominic <a0486429@ti.com>
Fri, 29 Jul 2022 15:09:51 +0000 (20:39 +0530)
committerRishabh Garg <rishabh@ti.com>
Fri, 29 Jul 2022 16:01:05 +0000 (11:01 -0500)
- __TSC compiler intrinsic is not applicable for C7x Host Emualtion Build
- Guard the same with Host Emulation Build flag to avoid build failures

Signed-off-by: Don Dominic <a0486429@ti.com>
packages/ti/osal/arch/core/c7x/Arch_util.c

index 5ab6c8a5eac1d7110cf289ba9a04bcb73a8d59e2..f8c5671a53d8e7d1de38bcdc5ffe6c7eea26afcc 100644 (file)
@@ -266,7 +266,12 @@ void osalArch_TimestampGet64(TimeStamp_Struct *tStamp)
     uint32_t   lo, hi;
 
     key     = HwiP_disable();
+#if !defined (HOST_EMULATION)
     cycle   = __TSC;
+#else
+    /* Not supported in host emulation mode */
+    cycle   = 0U;
+#endif
     cycleHi = ((uint64_t)(cycle >> 32U));
 
     /* get the lo and hi parts */