1. A computer-implemented method for dynamic enablement of multithreading in a configuration comprising a core configurable between a single thread (ST) mode and a multithreading (MT) mode, the ST mode addressing a primary thread and the MT mode addressing the primary thread and one or more secondary threads on shared resources of the core, the method comprising: executing in the primary thread in the ST mode, an MT mode setting instruction; obtaining a number of threads requested from a location specified by the MT mode setting instruction; and based on determining that the number of threads requested indicates multiple threads, enabling the MT mode to execute the multiple threads comprising the primary thread and the one or more secondary threads.