« first day (2848 days earlier)      last day (11 days later) » 

10:47 AM
I get the following error on aarch64 and am not quite sure why the compiler is unhappy:
#define POOL_SIZE 230
uintptr_t myPool[POOL_SIZE];

for(int i = 0; i < POOL_SIZE; i++)
{
    volatile uint64_t value;
    asm volatile("ldr %0, [%1]" : "=r" (value) : "r" (myPool + i) : "memory");
}
/tmp/ccVwvspc.s:394: Error: operand 1 must be an integer register -- `ldr r0,[x1]'
myPool is a pool of memory addresses
Based on what I read this error occurswhen you use immediate operands, which is not my case here AFAIK
 
 
10 hours later…
8:24 PM
What is the "most correct" type to use when referencing an element in a vector? e.g. int, unsigned int, size_t, size_type? Does it make a difference if the vector is templated?
 
8:48 PM
@northerner en.cppreference.com/w/cpp/container/vector/at, Unsigned integer type (usually std::size_t)
@northerner int everywhere is some google practice that for example, leads to issues when you need to communicate size restrictions via strong types (or even just incompatibilities with the stl)
 

« first day (2848 days earlier)      last day (11 days later) »