Skip to content

Commit

Permalink
Merge pull request #105 from pulp-platform/fix-gcc9.2-1
Browse files Browse the repository at this point in the history
Minor fixes for GCC 9.2 support
  • Loading branch information
NBruschi authored Jul 26, 2021
2 parents 5ac08f3 + 02b9c48 commit 6aaa646
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions rtos/pulpos/common/include/pos/implem/implem.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ static inline uint32_t pi_cluster_id()
static inline int pi_cl_cluster_nb_cores()
{
#ifdef ARCHI_HAS_CC
return __builtin_pulp_CoreCount() + 1;
return ARCHI_CLUSTER_NB_PE + 1;
#else
return __builtin_pulp_CoreCount();
return ARCHI_CLUSTER_NB_PE;
#endif
}

static inline uint32_t pi_cl_cluster_nb_pe_cores()
{
return __builtin_pulp_CoreCount();
return ARCHI_CLUSTER_NB_PE;
}

static inline uint32_t pi_is_fc()
Expand Down Expand Up @@ -171,4 +171,4 @@ extern unsigned char __l1_heap_size;

#define rt_platform() __PLATFORM__

#endif
#endif
2 changes: 1 addition & 1 deletion rtos/pulpos/pulp/drivers/cluster/pe-eu-v3.S
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ pos_set_slave_stack:
// and thus we need to take the next stack
addi t5, s3, 1
#endif
p.mul t4, t5, a0
mul t4, t5, a0
add sp, t4, t0

ret
2 changes: 1 addition & 1 deletion rtos/pulpos/pulp_archi/include/archi/riscv/builtins_v2.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ static inline unsigned int __attribute__ ((always_inline)) __ExtInsMaskSafe(unsi

#define __COREID() __builtin_pulp_CoreId()
#define __CLUSTERID() __builtin_pulp_ClusterId()
#define __NCORE() __builtin_pulp_CoreCount()
#define __NCORE() (ARCHI_CLUSTER_NB_PE)
#define __ISFC() __builtin_pulp_IsFc()

#define __SPRWRITE(x, y) __builtin_pulp_spr_write(x, y)
Expand Down
2 changes: 1 addition & 1 deletion rtos/pulpos/pulp_hal/include/hal/riscv/builtins_v2.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ typedef unsigned int rt_pointerT;

#define __COREID() __builtin_pulp_CoreId()
#define __CLUSTERID() __builtin_pulp_ClusterId()
#define __NCORE() __builtin_pulp_CoreCount()
#define __NCORE() (ARCHI_CLUSTER_NB_PE)
#define __ISFC() __builtin_pulp_IsFc()

#define __SPRWRITE(x, y) __builtin_pulp_spr_write(x, y)
Expand Down

0 comments on commit 6aaa646

Please sign in to comment.